1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include "lnn_cipherkey_manager.h"
17 
18 #include "lnn_log.h"
19 #include "softbus_errcode.h"
20 
LnnInitCipherKeyManager(void)21 int32_t LnnInitCipherKeyManager(void)
22 {
23     LNN_LOGI(LNN_INIT, "init virtual lnn cipherkey manager");
24     return SOFTBUS_OK;
25 }
26 
LnnDeinitCipherKeyManager(void)27 void LnnDeinitCipherKeyManager(void)
28 {
29     LNN_LOGI(LNN_INIT, "Deinit virtual lnn cipherkey manager");
30 }
31 
GetCipherKeyByNetworkId(const char * networkId,int32_t seq,uint32_t tableIndex,unsigned char * key,int32_t keyLen)32 bool GetCipherKeyByNetworkId(const char *networkId, int32_t seq, uint32_t tableIndex, unsigned char *key,
33     int32_t keyLen)
34 {
35     return true;
36 }
37 
GetLocalCipherKey(int32_t seq,uint32_t * tableIndex,unsigned char * key,int32_t keyLen)38 bool GetLocalCipherKey(int32_t seq, uint32_t *tableIndex, unsigned char *key, int32_t keyLen)
39 {
40     return true;
41 }
42 
PackCipherKeySyncMsg(void * json)43 bool PackCipherKeySyncMsg(void *json)
44 {
45     (void)json;
46     return true;
47 }
48 
ProcessCipherKeySyncInfo(const void * json,const char * networkId)49 void ProcessCipherKeySyncInfo(const void *json, const char *networkId)
50 {
51     (void)json;
52     (void)networkId;
53     return;
54 }
55 
LoadBleBroadcastKey(void)56 void LoadBleBroadcastKey(void)
57 {
58     return;
59 }
60 
IsCipherManagerFindKey(const char * udid)61 bool IsCipherManagerFindKey(const char *udid)
62 {
63     (void)udid;
64     return false;
65 }
66 
LnnLoadLocalBroadcastCipherKey(void)67 int32_t LnnLoadLocalBroadcastCipherKey(void)
68 {
69     return SOFTBUS_OK;
70 }
71 
LnnGetLocalBroadcastCipherKey(BroadcastCipherKey * broadcastKey)72 int32_t LnnGetLocalBroadcastCipherKey(BroadcastCipherKey *broadcastKey)
73 {
74     (void)broadcastKey;
75     return SOFTBUS_OK;
76 }
77 
LnnSaveLocalBroadcastCipherKey(const BroadcastCipherKey * broadcastKey)78 int32_t LnnSaveLocalBroadcastCipherKey(const BroadcastCipherKey *broadcastKey)
79 {
80     (void)broadcastKey;
81     return SOFTBUS_OK;
82 }
83 
LnnUpdateLocalBroadcastCipherKey(BroadcastCipherKey * broadcastKey)84 int32_t LnnUpdateLocalBroadcastCipherKey(BroadcastCipherKey *broadcastKey)
85 {
86     (void)broadcastKey;
87     return SOFTBUS_OK;
88 }
89 
LnnGetLocalBroadcastCipherInfo(CloudSyncInfo * info)90 int32_t LnnGetLocalBroadcastCipherInfo(CloudSyncInfo *info)
91 {
92     (void)info;
93     return SOFTBUS_OK;
94 }
95 
LnnSetRemoteBroadcastCipherInfo(const char * value,const char * udid)96 int32_t LnnSetRemoteBroadcastCipherInfo(const char *value, const char *udid)
97 {
98     (void)value;
99     (void)udid;
100     return SOFTBUS_OK;
101 }
102