• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_error_code.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,AesCtrCipherKey * cipherkey,int32_t keyLen)32 bool GetCipherKeyByNetworkId(const char *networkId, int32_t seq, uint32_t tableIndex, AesCtrCipherKey *cipherkey,
33     int32_t keyLen)
34 {
35     (void)networkId;
36     (void)seq;
37     (void)tableIndex;
38     (void)cipherkey;
39     (void)keyLen;
40     return true;
41 }
42 
GetLocalCipherKey(int32_t seq,uint32_t * tableIndex,AesCtrCipherKey * cipherkey,int32_t keyLen)43 bool GetLocalCipherKey(int32_t seq, uint32_t *tableIndex, AesCtrCipherKey *cipherkey, int32_t keyLen)
44 {
45     (void)seq;
46     (void)tableIndex;
47     (void)cipherkey;
48     (void)keyLen;
49     return true;
50 }
51 
PackCipherKeySyncMsg(void * json)52 bool PackCipherKeySyncMsg(void *json)
53 {
54     (void)json;
55     return true;
56 }
57 
ProcessCipherKeySyncInfo(const void * json,const char * networkId)58 void ProcessCipherKeySyncInfo(const void *json, const char *networkId)
59 {
60     (void)json;
61     (void)networkId;
62     return;
63 }
64 
LoadBleBroadcastKey(void)65 void LoadBleBroadcastKey(void)
66 {
67     return;
68 }
69 
IsCipherManagerFindKey(const char * udid)70 bool IsCipherManagerFindKey(const char *udid)
71 {
72     (void)udid;
73     return false;
74 }
75 
GenerateNewLocalCipherKey(void)76 int32_t GenerateNewLocalCipherKey(void)
77 {
78     return SOFTBUS_OK;
79 }
80 
LnnLoadLocalBroadcastCipherKey(void)81 int32_t LnnLoadLocalBroadcastCipherKey(void)
82 {
83     return SOFTBUS_OK;
84 }
85 
LnnGetLocalBroadcastCipherKey(BroadcastCipherKey * broadcastKey)86 int32_t LnnGetLocalBroadcastCipherKey(BroadcastCipherKey *broadcastKey)
87 {
88     (void)broadcastKey;
89     return SOFTBUS_OK;
90 }
91 
LnnSaveLocalBroadcastCipherKey(const BroadcastCipherKey * broadcastKey)92 int32_t LnnSaveLocalBroadcastCipherKey(const BroadcastCipherKey *broadcastKey)
93 {
94     (void)broadcastKey;
95     return SOFTBUS_OK;
96 }
97 
LnnUpdateLocalBroadcastCipherKey(BroadcastCipherKey * broadcastKey)98 int32_t LnnUpdateLocalBroadcastCipherKey(BroadcastCipherKey *broadcastKey)
99 {
100     (void)broadcastKey;
101     return SOFTBUS_OK;
102 }
103 
LnnGetLocalBroadcastCipherInfo(CloudSyncInfo * info)104 int32_t LnnGetLocalBroadcastCipherInfo(CloudSyncInfo *info)
105 {
106     (void)info;
107     return SOFTBUS_OK;
108 }
109 
LnnSetRemoteBroadcastCipherInfo(const char * value,const char * udid)110 int32_t LnnSetRemoteBroadcastCipherInfo(const char *value, const char *udid)
111 {
112     (void)value;
113     (void)udid;
114     return SOFTBUS_OK;
115 }
116 
LnnSyncBroadcastLinkKey(const char * networkId)117 int32_t LnnSyncBroadcastLinkKey(const char *networkId)
118 {
119     (void)networkId;
120     return SOFTBUS_OK;
121 }
122 
IsNeedSyncBroadcastLinkKey(const char * networkId)123 bool IsNeedSyncBroadcastLinkKey(const char *networkId)
124 {
125     (void)networkId;
126     return true;
127 }
128 
LnnInitBroadcastLinkKey(void)129 int32_t LnnInitBroadcastLinkKey(void)
130 {
131     return SOFTBUS_OK;
132 }
133 
LnnDeinitBroadcastLinkKey(void)134 void LnnDeinitBroadcastLinkKey(void)
135 {
136     return;
137 }