Home
last modified time | relevance | path

Searched refs:cipherKey (Results 1 - 25 of 31) sorted by relevance

12

/foundation/communication/dsoftbus/adapter/common/openssl/
H A Dsoftbus_aes_encrypt.c90 AesCipherKey *cipherKey, const AesInputData *inData, int32_t encMode, AesOutputData *outData) in OpensslAesCfbEncrypt()
95 if (cipherKey == NULL || cipherKey->ivLen != AES_IV_LENGTH || inData == NULL || inData->data == NULL || in OpensslAesCfbEncrypt()
101 switch (cipherKey->keyLen) { in OpensslAesCfbEncrypt()
109 COMM_LOGE(COMM_ADAPTER, "cipherKey->keyLen unable to get encryption bits."); in OpensslAesCfbEncrypt()
112 if (AES_set_encrypt_key(cipherKey->key, bits, &aes) < 0) { in OpensslAesCfbEncrypt()
117 AES_cfb128_encrypt(inData->data, outData->data, inData->len, &aes, cipherKey->iv, &num, ENCRYPT_MODE); in OpensslAesCfbEncrypt()
119 AES_cfb128_encrypt(inData->data, outData->data, inData->len, &aes, cipherKey->iv, &num, DECRYPT_MODE); in OpensslAesCfbEncrypt()
126 static int32_t RootKeyGenerateIvAndSessionKey(const EncryptKey *randomKey, EncryptKey *rootKey, AesCipherKey *cipherKey) in RootKeyGenerateIvAndSessionKey() argument
133 if (memcpy_s(cipherKey in RootKeyGenerateIvAndSessionKey()
89 OpensslAesCfbEncrypt( AesCipherKey *cipherKey, const AesInputData *inData, int32_t encMode, AesOutputData *outData) OpensslAesCfbEncrypt() argument
148 GenerateIvAndSessionKey(const EncryptKey *randomKey, EncryptKey *rootKey, AesCipherKey *cipherKey) GenerateIvAndSessionKey() argument
184 AesCipherKey cipherKey = { 0 }; SoftBusAesCfbRootEncrypt() local
214 SoftBusAesCfbEncrypt( const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData) SoftBusAesCfbEncrypt() argument
318 OpensslAesGcmEncrypt( const uint8_t *srcData, uint32_t srcDataLen, AesCipherKey *cipherKey, uint8_t *outData, uint32_t *outDataLen) OpensslAesGcmEncrypt() argument
371 OpensslAesGcmDecrypt( const uint8_t *srcData, uint32_t srcDataLen, AesCipherKey *cipherKey, uint8_t *outData, uint32_t *outDataLen) OpensslAesGcmDecrypt() argument
423 SoftBusAesGcmEncrypt( const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData) SoftBusAesGcmEncrypt() argument
[all...]
H A Dsoftbus_adapter_crypto.c397 int32_t SoftBusEncryptData(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, in SoftBusEncryptData() argument
400 if (cipherKey == NULL || input == NULL || inLen == 0 || encryptData == NULL || encryptLen == NULL) { in SoftBusEncryptData()
404 if (SoftBusGenerateRandomArray(cipherKey->iv, sizeof(cipherKey->iv)) != SOFTBUS_OK) { in SoftBusEncryptData()
409 int32_t result = SslAesGcmEncrypt(cipherKey, input, inLen, encryptData, outLen); in SoftBusEncryptData()
417 int32_t SoftBusEncryptDataWithSeq(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, in SoftBusEncryptDataWithSeq() argument
420 if (cipherKey == NULL || input == NULL || inLen == 0 || encryptData == NULL || encryptLen == NULL) { in SoftBusEncryptDataWithSeq()
423 if (SoftBusGenerateRandomArray(cipherKey->iv, sizeof(cipherKey->iv)) != SOFTBUS_OK) { in SoftBusEncryptDataWithSeq()
427 if (memcpy_s(cipherKey in SoftBusEncryptDataWithSeq()
439 SoftBusDecryptData(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, unsigned char *decryptData, uint32_t *decryptLen) SoftBusDecryptData() argument
459 SoftBusDecryptDataWithSeq(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, unsigned char *decryptData, uint32_t *decryptLen, int32_t seqNum) SoftBusDecryptDataWithSeq() argument
[all...]
/foundation/communication/dsoftbus/tests/adapter/unittest/
H A Ddsoftbus_crypto_test.cpp280 AesGcmCipherKey cipherKey; in HWTEST_F() local
281 cipherKey.keyLen = SESSION_KEY_LENGTH; in HWTEST_F()
282 int32_t ret = SoftBusGenerateRandomArray(cipherKey.key, SESSION_KEY_LENGTH); in HWTEST_F()
289 ret = SoftBusEncryptData(&cipherKey, (unsigned char*)input, in HWTEST_F()
296 * @tc.desc: cipherKey、input and inLen is invalid param
302 AesGcmCipherKey cipherKey; in HWTEST_F() local
303 cipherKey.keyLen = 32; in HWTEST_F()
311 ret = SoftBusEncryptData(&cipherKey, nullptr, inLen, (unsigned char*)encryptData, &encryptLen); in HWTEST_F()
313 ret = SoftBusEncryptData(&cipherKey, (unsigned char*)input, inLen1, (unsigned char*)encryptData, &encryptLen); in HWTEST_F()
325 AesGcmCipherKey cipherKey; in HWTEST_F() local
345 AesGcmCipherKey cipherKey; HWTEST_F() local
368 AesGcmCipherKey cipherKey; HWTEST_F() local
390 AesGcmCipherKey cipherKey; HWTEST_F() local
410 AesGcmCipherKey cipherKey; HWTEST_F() local
433 AesGcmCipherKey cipherKey; HWTEST_F() local
460 AesGcmCipherKey cipherKey; HWTEST_F() local
494 AesGcmCipherKey cipherKey; HWTEST_F() local
524 AesGcmCipherKey cipherKey; HWTEST_F() local
552 AesGcmCipherKey cipherKey; HWTEST_F() local
583 AesGcmCipherKey cipherKey; HWTEST_F() local
612 AesGcmCipherKey cipherKey; HWTEST_F() local
[all...]
H A Ddsoftbus_aes_crypto_test.cpp326 AesCipherKey cipherKey = { randSession, randKeyLen, randIv, randIvLen }; in HWTEST_F() local
328 ret = SoftBusAesGcmEncrypt(&encryptInData, &cipherKey, ENCRYPT_MODE, &encryptOutData); in HWTEST_F()
330 ret = SoftBusAesGcmEncrypt((const AesInputData *)&encryptOutData, &cipherKey, DECRYPT_MODE, &decryptOutData); in HWTEST_F()
363 AesCipherKey cipherKey = { randSession, randKeyLen, randIv, randIvLen }; in HWTEST_F() local
365 ret = SoftBusAesGcmEncrypt(nullptr, &cipherKey, ENCRYPT_MODE, &encryptOutData); in HWTEST_F()
367 ret = SoftBusAesGcmEncrypt((const AesInputData *)&encryptOutData, &cipherKey, DECRYPT_MODE, &decryptOutData); in HWTEST_F()
372 ret = SoftBusAesGcmEncrypt((const AesInputData *)&encryptOutData, &cipherKey, DECRYPT_MODE, &decryptOutData); in HWTEST_F()
375 ret = SoftBusAesGcmEncrypt(&encryptInData, &cipherKey, ENCRYPT_MODE, nullptr); in HWTEST_F()
377 ret = SoftBusAesGcmEncrypt((const AesInputData *)&encryptOutData, &cipherKey, DECRYPT_MODE, &decryptOutData); in HWTEST_F()
405 AesCipherKey cipherKey in HWTEST_F() local
445 AesCipherKey cipherKey = { randSession, randKeyLen, randIv, randIvLen }; HWTEST_F() local
484 AesCipherKey cipherKey = { randSession, randKeyLen, randIv, randIvLen }; HWTEST_F() local
527 AesCipherKey cipherKey = { randSession, randKeyLen, randIv, randIvLen }; HWTEST_F() local
575 AesCipherKey cipherKey = { randSession, randKeyLen, randIv, randIvLen }; HWTEST_F() local
621 AesCipherKey cipherKey = { randSession, randKeyLen, randIv, randIvLen }; HWTEST_F() local
[all...]
/foundation/communication/dsoftbus/core/bus_center/utils/src/
H A Dlnn_common_utils.c65 AesGcmCipherKey cipherKey = {.keyLen = in->keyLen}; in LnnEncryptAesGcm() local
66 if (memcpy_s(cipherKey.key, sizeof(cipherKey.key), in->key, in->keyLen) != EOK) { in LnnEncryptAesGcm()
71 int32_t ret = SoftBusEncryptData(&cipherKey, in->data, in->dataLen, encData, &encDataLen); in LnnEncryptAesGcm()
72 (void)memset_s(&cipherKey, sizeof(AesGcmCipherKey), 0, sizeof(AesGcmCipherKey)); in LnnEncryptAesGcm()
98 AesGcmCipherKey cipherKey = {.keyLen = in->keyLen}; in LnnDecryptAesGcm() local
99 if (memcpy_s(cipherKey.key, sizeof(cipherKey.key), in->key, in->keyLen) != EOK) { in LnnDecryptAesGcm()
104 int32_t ret = SoftBusDecryptData(&cipherKey, in->data, in->dataLen, decData, &decDataLen); in LnnDecryptAesGcm()
105 (void)memset_s(&cipherKey, sizeo in LnnDecryptAesGcm()
[all...]
/foundation/communication/dsoftbus/adapter/common/mbedtls/
H A Dsoftbus_adapter_crypto.c78 static int32_t MbedAesGcmEncrypt(const AesGcmCipherKey *cipherKey, const unsigned char *plainText, in MbedAesGcmEncrypt() argument
81 if ((cipherKey == NULL) || (plainText == NULL) || (plainTextSize == 0) || cipherText == NULL || in MbedAesGcmEncrypt()
92 ret = mbedtls_gcm_setkey(&aesContext, MBEDTLS_CIPHER_ID_AES, cipherKey->key, cipherKey->keyLen * KEY_BITS_UNIT); in MbedAesGcmEncrypt()
98 ret = mbedtls_gcm_crypt_and_tag(&aesContext, MBEDTLS_GCM_ENCRYPT, plainTextSize, cipherKey->iv, GCM_IV_LEN, NULL, 0, in MbedAesGcmEncrypt()
105 if (memcpy_s(cipherText, cipherTextLen, cipherKey->iv, GCM_IV_LEN) != EOK) { in MbedAesGcmEncrypt()
120 static int32_t MbedAesGcmDecrypt(const AesGcmCipherKey *cipherKey, const unsigned char *cipherText, in MbedAesGcmDecrypt() argument
123 if ((cipherKey == NULL) || (cipherText == NULL) || (cipherTextSize <= OVERHEAD_LEN) || plain == NULL || in MbedAesGcmDecrypt()
132 mbedtls_gcm_setkey(&aesContext, MBEDTLS_CIPHER_ID_AES, cipherKey->key, cipherKey in MbedAesGcmDecrypt()
269 SoftBusEncryptData(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, unsigned char *encryptData, uint32_t *encryptLen) SoftBusEncryptData() argument
289 SoftBusEncryptDataWithSeq(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, unsigned char *encryptData, uint32_t *encryptLen, int32_t seqNum) SoftBusEncryptDataWithSeq() argument
311 SoftBusDecryptData(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, unsigned char *decryptData, uint32_t *decryptLen) SoftBusDecryptData() argument
331 SoftBusDecryptDataWithSeq(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, unsigned char *decryptData, uint32_t *decryptLen, int32_t seqNum) SoftBusDecryptDataWithSeq() argument
[all...]
H A Dsoftbus_aes_encrypt_virtual.c42 const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData) in SoftBusAesCfbEncrypt()
45 (void)cipherKey; in SoftBusAesCfbEncrypt()
52 const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData) in SoftBusAesGcmEncrypt()
55 (void)cipherKey; in SoftBusAesGcmEncrypt()
41 SoftBusAesCfbEncrypt( const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData) SoftBusAesCfbEncrypt() argument
51 SoftBusAesGcmEncrypt( const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData) SoftBusAesGcmEncrypt() argument
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/stream/adaptor/src/
H A Dstream_adaptor.cpp119 AesGcmCipherKey cipherKey = {0}; in Encrypt() local
126 cipherKey.keyLen = SESSION_KEY_LENGTH; in Encrypt()
127 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey.first, sessionKey.second) != EOK) { in Encrypt()
132 int ret = SoftBusEncryptData(&cipherKey, reinterpret_cast<const unsigned char *>(in), inLen, in Encrypt()
134 (void)memset_s(&cipherKey, sizeof(AesGcmCipherKey), 0, sizeof(AesGcmCipherKey)); in Encrypt()
146 AesGcmCipherKey cipherKey = {0}; in Decrypt() local
153 cipherKey.keyLen = SESSION_KEY_LENGTH; // 256 bit encryption in Decrypt()
154 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey.first, sessionKey.second) != EOK) { in Decrypt()
158 int ret = SoftBusDecryptData(&cipherKey, reinterpret_cast<const unsigned char *>(in), inLen, in Decrypt()
160 (void)memset_s(&cipherKey, sizeo in Decrypt()
[all...]
/foundation/communication/dsoftbus/tests/core/transmission/common/mock/src/
H A Dtrans_common_mock.cpp61 int32_t SoftBusEncryptDataWithSeq(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, in SoftBusEncryptDataWithSeq() argument
64 return GetCommonInterface()->SoftBusEncryptDataWithSeq(cipherKey, input, inLen, encryptData, encryptLen, seqNum); in SoftBusEncryptDataWithSeq()
67 int32_t SoftBusDecryptDataWithSeq(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, in SoftBusDecryptDataWithSeq() argument
70 return GetCommonInterface()->SoftBusDecryptDataWithSeq(cipherKey, input, inLen, decryptData, decryptLen, seqNum); in SoftBusDecryptDataWithSeq()
/foundation/communication/dsoftbus/tests/adapter/fuzztest/softbusdecryptdata_fuzzer/
H A Dsoftbusdecryptdata_fuzzer.cpp27 AesGcmCipherKey cipherKey; in SoftBusDecryptDataTest() local
30 SoftBusDecryptData(&cipherKey, reinterpret_cast<const unsigned char*>(data), size, in SoftBusDecryptDataTest()
/foundation/communication/dsoftbus/tests/adapter/fuzztest/softbusaescrypto_fuzzer/
H A Dsoftbusaescrypto_fuzzer.cpp71 AesCipherKey cipherKey = { (uint8_t *)data, size, (uint8_t *)data, size }; in SoftBusAesGcmEncryptFuzzTest() local
73 if (SoftBusAesGcmEncrypt(&encryptInData, &cipherKey, ENCRYPT_MODE, &encryptOutData) != SOFTBUS_OK) { in SoftBusAesGcmEncryptFuzzTest()
77 if (SoftBusAesGcmEncrypt((const AesInputData *)&encryptOutData, &cipherKey, DECRYPT_MODE, &decryptOutData) != in SoftBusAesGcmEncryptFuzzTest()
121 AesCipherKey cipherKey = { randomSession, size, randomIv, size }; in SoftBusAesCfbEncryptFuzzTest() local
124 if (SoftBusAesCfbEncrypt(&encryptInData, &cipherKey, ENCRYPT_MODE, &encryptOutData) != SOFTBUS_OK) { in SoftBusAesCfbEncryptFuzzTest()
/foundation/communication/dsoftbus/adapter/common/include/
H A Dsoftbus_aes_encrypt.h63 const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData);
66 const AesInputData *inData, AesCipherKey *cipherKey, int32_t encMode, AesOutputData *outData);
H A Dsoftbus_adapter_crypto.h80 int32_t SoftBusEncryptDataWithSeq(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen,
86 int32_t SoftBusDecryptDataWithSeq(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen,
/foundation/communication/dsoftbus/tests/core/transmission/common/mock/include/
H A Dtrans_common_mock.h38 virtual int32_t SoftBusEncryptDataWithSeq(AesGcmCipherKey *cipherKey,
42 virtual int32_t SoftBusDecryptDataWithSeq(AesGcmCipherKey *cipherKey,
/foundation/communication/dsoftbus/core/authentication/src/
H A Dauth_session_key.c434 AesGcmCipherKey cipherKey = {.keyLen = sessionKey.len}; in EncryptData() local
435 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey.value, sessionKey.len) != EOK) { in EncryptData()
441 int32_t ret = SoftBusEncryptDataWithSeq(&cipherKey, inDataInfo->inData, inDataInfo->inLen, in EncryptData()
443 (void)memset_s(&cipherKey, sizeof(AesGcmCipherKey), 0, sizeof(AesGcmCipherKey)); in EncryptData()
467 AesGcmCipherKey cipherKey = {.keyLen = sessionKey.len}; in DecryptData() local
468 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey.value, sessionKey.len) != EOK) { in DecryptData()
474 int32_t ret = SoftBusDecryptDataWithSeq(&cipherKey, inDataInfo->inData + ENCRYPT_INDEX_LEN, in DecryptData()
476 (void)memset_s(&cipherKey, sizeof(AesGcmCipherKey), 0, sizeof(AesGcmCipherKey)); in DecryptData()
H A Dauth_session_json.c1256 static void DumpRpaCipherKey(char *cipherKey, char *cipherIv, const char *peerIrk, const char *log) in DumpRpaCipherKey() argument
1261 Anonymize(cipherKey, &anonyCipherKey); in DumpRpaCipherKey()
1264 AUTH_LOGI(AUTH_FSM, "log=%{public}s, cipherKey=%{public}s, cipherIv=%{public}s, peerIrk=%{public}s", log, in DumpRpaCipherKey()
1290 char cipherKey[SESSION_KEY_STR_LEN] = {0}; in PackCipherRpaInfo() local
1295 if (ConvertBytesToHexString(cipherKey, SESSION_KEY_STR_LEN, in PackCipherRpaInfo()
1303 (void)memset_s(cipherKey, SESSION_KEY_STR_LEN, 0, SESSION_KEY_STR_LEN); in PackCipherRpaInfo()
1309 (void)memset_s(cipherKey, SESSION_KEY_STR_LEN, 0, SESSION_KEY_STR_LEN); in PackCipherRpaInfo()
1315 (void)memset_s(cipherKey, SESSION_KEY_STR_LEN, 0, SESSION_KEY_STR_LEN); in PackCipherRpaInfo()
1319 (void)JSON_AddStringToObject(json, BROADCAST_CIPHER_KEY, cipherKey); in PackCipherRpaInfo()
1323 DumpRpaCipherKey(cipherKey, cipherI in PackCipherRpaInfo()
1335 char cipherKey[SESSION_KEY_STR_LEN] = {0}; UnpackCipherRpaInfo() local
[all...]
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/tcp_direct/src/
H A Dclient_trans_tcp_direct_message.c75 AesGcmCipherKey cipherKey = {0}; in TransTdcDecrypt() local
76 cipherKey.keyLen = SESSION_KEY_LENGTH; // 256 bit encryption in TransTdcDecrypt()
77 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey, SESSION_KEY_LENGTH) != EOK) { in TransTdcDecrypt()
81 int32_t ret = SoftBusDecryptData(&cipherKey, (unsigned char*)in, inLen, (unsigned char*)out, outLen); in TransTdcDecrypt()
82 (void)memset_s(&cipherKey, sizeof(AesGcmCipherKey), 0, sizeof(AesGcmCipherKey)); in TransTdcDecrypt()
93 AesGcmCipherKey cipherKey = {0}; in TransTdcEncryptWithSeq() local
94 cipherKey.keyLen = SESSION_KEY_LENGTH; in TransTdcEncryptWithSeq()
95 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey, SESSION_KEY_LENGTH) != EOK) { in TransTdcEncryptWithSeq()
99 int ret = SoftBusEncryptDataWithSeq(&cipherKey, (unsigned char*)in, inLen, (unsigned char*)out, outLen, seqNum); in TransTdcEncryptWithSeq()
100 if (memset_s(&cipherKey, sizeo in TransTdcEncryptWithSeq()
[all...]
/foundation/communication/dsoftbus/core/bus_center/lnn/net_builder/include/
H A Dlnn_data_cloud_sync.h60 unsigned char cipherKey[SESSION_KEY_LENGTH]; member
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/proxy/src/
H A Dclient_trans_proxy_manager.c409 AesGcmCipherKey cipherKey = { 0 }; in ClientTransProxyDecryptPacketData() local
410 cipherKey.keyLen = SESSION_KEY_LENGTH; in ClientTransProxyDecryptPacketData()
411 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, info.sessionKey, SESSION_KEY_LENGTH) != EOK) { in ClientTransProxyDecryptPacketData()
416 &cipherKey, dataInfo->inData, dataInfo->inLen, dataInfo->outData, &(dataInfo->outLen), seq); in ClientTransProxyDecryptPacketData()
417 (void)memset_s(&cipherKey, sizeof(AesGcmCipherKey), 0, sizeof(AesGcmCipherKey)); in ClientTransProxyDecryptPacketData()
929 AesGcmCipherKey cipherKey = { 0 }; in ClientTransProxyPackBytes() local
930 cipherKey.keyLen = SESSION_KEY_LENGTH; in ClientTransProxyPackBytes()
931 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey, SESSION_KEY_LENGTH) != EOK) { in ClientTransProxyPackBytes()
937 int32_t ret = SoftBusEncryptDataWithSeq(&cipherKey, (const unsigned char *)dataInfo->inData, in ClientTransProxyPackBytes()
939 (void)memset_s(cipherKey in ClientTransProxyPackBytes()
[all...]
/foundation/communication/dsoftbus/core/transmission/common/src/
H A Dsoftbus_message_open_channel.c420 AesGcmCipherKey cipherKey = {0}; in TransTdcEncrypt() local
421 cipherKey.keyLen = SESSION_KEY_LENGTH; in TransTdcEncrypt()
422 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey, SESSION_KEY_LENGTH) != EOK) { in TransTdcEncrypt()
426 int32_t ret = SoftBusEncryptData(&cipherKey, (unsigned char *)in, inLen, (unsigned char *)out, outLen); in TransTdcEncrypt()
427 (void)memset_s(&cipherKey, sizeof(AesGcmCipherKey), 0, sizeof(AesGcmCipherKey)); in TransTdcEncrypt()
/foundation/communication/dsoftbus/tests/core/transmission/trans_channel/tcp_direct/unittest/mock/
H A Dtrans_tcp_direct_message_test_mock.cpp201 int32_t SoftBusEncryptData(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen, in SoftBusEncryptData() argument
204 return GetTransTcpDirectMessageInterface()->SoftBusEncryptData(cipherKey, input, inLen, encryptData, encryptLen); in SoftBusEncryptData()
H A Dtrans_tcp_direct_message_test_mock.h74 virtual int32_t SoftBusEncryptData(AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen,
124 MOCK_METHOD5(SoftBusEncryptData, int32_t (AesGcmCipherKey *cipherKey, const unsigned char *input, uint32_t inLen,
/foundation/communication/dsoftbus/sdk/transmission/trans_channel/udp/stream/libsoftbus_stream/
H A Dvtp_stream_socket.cpp1543 AesGcmCipherKey cipherKey = {0}; in Encrypt() local
1550 cipherKey.keyLen = SESSION_KEY_LENGTH; in Encrypt()
1551 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey_.first, sessionKey_.second) != EOK) { in Encrypt()
1556 int ret = SoftBusEncryptData(&cipherKey, (unsigned char *)in, inLen, (unsigned char *)out, (unsigned int *)&outLen); in Encrypt()
1557 (void)memset_s(&cipherKey, sizeof(AesGcmCipherKey), 0, sizeof(AesGcmCipherKey)); in Encrypt()
1571 AesGcmCipherKey cipherKey = {0}; in Decrypt() local
1578 cipherKey.keyLen = SESSION_KEY_LENGTH; // 256 bit encryption in Decrypt()
1579 if (memcpy_s(cipherKey.key, SESSION_KEY_LENGTH, sessionKey_.first, sessionKey_.second) != EOK) { in Decrypt()
1583 int ret = SoftBusDecryptData(&cipherKey, (unsigned char *)in, inLen, (unsigned char *)out, (unsigned int *)&outLen); in Decrypt()
1584 (void)memset_s(&cipherKey, sizeo in Decrypt()
[all...]
/foundation/communication/dsoftbus/tests/core/bus_center/lnn/net_ledger/
H A Dlnn_disctributed_net_ledger_test.cpp224 unsigned char cipherKey[SESSION_KEY_LENGTH] = {0}; in HWTEST_F() local
225 ret = LnnGetRemoteByteInfo(nullptr, BYTE_KEY_BROADCAST_CIPHER_KEY, cipherKey, SESSION_KEY_LENGTH); in HWTEST_F()
229 ret = LnnGetRemoteByteInfo(NODE1_NETWORK_ID, BYTE_KEY_BROADCAST_CIPHER_KEY, cipherKey, SESSION_KEY_LENGTH); in HWTEST_F()
1025 const char *cipherKey = "qqqqqqqqqqqq"; in HWTEST_F() local
1026 int32_t ret = LnnSetDLDeviceBroadcastCipherKey(udid, cipherKey); in HWTEST_F()
1029 ret = LnnSetDLDeviceBroadcastCipherKey(devUdid, cipherKey); in HWTEST_F()
/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/distributed_ledger/include/
H A Dlnn_distributed_net_ledger.h104 int32_t LnnSetDLDeviceBroadcastCipherKey(const char *udid, const void *cipherKey);

Completed in 18 milliseconds

12