/foundation/distributeddatamgr/datamgr_service/services/distributeddataservice/service/test/ |
H A D | crypto_manager_test.cpp | 32 static std::vector<uint8_t> randomKey; member in CryptoManagerTest 38 std::vector<uint8_t> CryptoManagerTest::randomKey; member in CryptoManagerTest 41 randomKey = Random(KEY_LENGTH); in SetUpTestCase() 46 randomKey.assign(randomKey.size(), 0); in TearDownTestCase() 95 auto encryptKey = CryptoManager::GetInstance().Encrypt(randomKey); in HWTEST_F() 122 auto encryptKey = CryptoManager::GetInstance().Encrypt(randomKey); in HWTEST_F() 140 auto result = CryptoManager::GetInstance().Decrypt(randomKey, key); in HWTEST_F()
|
H A D | kvdb_general_store_test.cpp | 181 std::vector<uint8_t> randomKey = Random(KEY_LENGTH); in HWTEST_F() local 184 secretKey.sKey = CryptoManager::GetInstance().Encrypt(randomKey); in HWTEST_F() 190 randomKey.assign(randomKey.size(), 0); in HWTEST_F()
|
/foundation/communication/dsoftbus/adapter/common/mbedtls/ |
H A D | softbus_aes_encrypt_virtual.c | 20 const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t hashLen) in SoftBusGenerateHmacHash() 22 (void)randomKey; in SoftBusGenerateHmacHash() 30 int32_t SoftBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey, in SoftBusAesCfbRootEncrypt() argument 34 (void)randomKey; in SoftBusAesCfbRootEncrypt() 19 SoftBusGenerateHmacHash( const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t hashLen) SoftBusGenerateHmacHash() argument
|
/foundation/communication/dsoftbus/tests/adapter/unittest/ |
H A D | dsoftbus_aes_crypto_test.cpp | 61 EncryptKey randomKey = { randStr, randLen }; in HWTEST_F() local 63 ret = SoftBusGenerateHmacHash(&randomKey, rootKey, rootKeyLen, hash, hashLen); in HWTEST_F() 86 EncryptKey randomKey = { randStr, randLen }; in HWTEST_F() local 90 ret = SoftBusGenerateHmacHash(&randomKey, nullptr, rootKeyLen, hash, hashLen); in HWTEST_F() 92 ret = SoftBusGenerateHmacHash(&randomKey, rootKey, rootKeyLen, nullptr, hashLen); in HWTEST_F() 117 EncryptKey randomKey = { randStr, randLen }; in HWTEST_F() local 119 ret = SoftBusGenerateHmacHash(&randomKey, rootKey, rootKeyLen1, hash, hashLen); in HWTEST_F() 121 ret = SoftBusGenerateHmacHash(&randomKey, rootKey, rootKeyLen, hash, hashLen1); in HWTEST_F() 149 EncryptKey randomKey = { randStr, randLen }; in HWTEST_F() local 152 ret = SoftBusAesCfbRootEncrypt(&encryptInData, &randomKey, in HWTEST_F() 188 EncryptKey randomKey = { randStr, randLen }; HWTEST_F() local 240 EncryptKey randomKey = { randStr, randLen }; HWTEST_F() local 285 EncryptKey randomKey = { randStr, randLen }; HWTEST_F() local [all...] |
/foundation/communication/dsoftbus/tests/adapter/fuzztest/softbusaescrypto_fuzzer/ |
H A D | softbusaescrypto_fuzzer.cpp | 30 EncryptKey randomKey = { data, size }; in SoftBusGenerateHmacHashFuzzTest() local 31 SoftBusGenerateHmacHash(&randomKey, data, size, hash, SHA256_MAC_LEN); in SoftBusGenerateHmacHashFuzzTest() 41 EncryptKey randomKey = { data, size }; in SoftBusAesCfbRootEncryptFuzzTest() local 44 if (SoftBusAesCfbRootEncrypt(&encryptInData, &randomKey, &rootKey, ENCRYPT_MODE, &encryptOutData) != SOFTBUS_OK) { in SoftBusAesCfbRootEncryptFuzzTest() 49 (const AesInputData *)&encryptOutData, &randomKey, &rootKey, DECRYPT_MODE, &decryptOutData) != SOFTBUS_OK) { in SoftBusAesCfbRootEncryptFuzzTest()
|
/foundation/communication/dsoftbus/adapter/common/include/ |
H A D | softbus_aes_encrypt.h | 56 const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t hashLen); 58 // Aes-cfb encrypt and decrypt by randomKey and rootKey 59 int32_t SoftBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey,
|
/foundation/communication/dsoftbus/adapter/common/openssl/ |
H A D | softbus_aes_encrypt.c | 40 const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t hashLen) in SoftBusGenerateHmacHash() 45 if (randomKey == NULL || rootKey == NULL || rootKeyLen == 0 || hash == NULL || hashLen < SHA256_MAC_LEN) { in SoftBusGenerateHmacHash() 64 if (HMAC_Update(ctx, randomKey->key, (size_t)randomKey->len) != 1) { in SoftBusGenerateHmacHash() 126 static int32_t RootKeyGenerateIvAndSessionKey(const EncryptKey *randomKey, EncryptKey *rootKey, AesCipherKey *cipherKey) in RootKeyGenerateIvAndSessionKey() argument 129 if (SoftBusGenerateHmacHash(randomKey, rootKey->key, rootKey->len, result, sizeof(result)) != SOFTBUS_OK) { in RootKeyGenerateIvAndSessionKey() 148 static int32_t GenerateIvAndSessionKey(const EncryptKey *randomKey, EncryptKey *rootKey, AesCipherKey *cipherKey) in GenerateIvAndSessionKey() argument 165 if (RootKeyGenerateIvAndSessionKey(randomKey, rootKey, cipherKey) != SOFTBUS_OK) { in GenerateIvAndSessionKey() 176 int32_t SoftBusAesCfbRootEncrypt(const AesInputData *inData, const EncryptKey *randomKey, EncryptKey *rootKey, in SoftBusAesCfbRootEncrypt() argument 179 if (inData == NULL || inData->data == NULL || randomKey in SoftBusAesCfbRootEncrypt() 39 SoftBusGenerateHmacHash( const EncryptKey *randomKey, const uint8_t *rootKey, uint32_t rootKeyLen, uint8_t *hash, uint32_t hashLen) SoftBusGenerateHmacHash() argument [all...] |
/foundation/communication/dsoftbus/tests/core/discovery/ble/softbus_ble_mock/ |
H A D | bus_center_mock.cpp | 52 int32_t LnnGenerateRandomByHuks(uint8_t *randomKey, uint32_t len) in LnnGenerateRandomByHuks() argument 54 return BusCenterMock::GetMock()->LnnGenerateRandomByHuks(randomKey, len); in LnnGenerateRandomByHuks()
|
H A D | bus_center_mock.h | 37 virtual int32_t LnnGenerateRandomByHuks(uint8_t *randomKey, uint32_t len) = 0; 58 MOCK_METHOD(int32_t, LnnGenerateRandomByHuks, (uint8_t *randomKey, uint32_t len), (override));
|
/foundation/communication/dsoftbus/tests/core/bus_center/lnn/unittest/ |
H A D | lnn_huks_test.cpp | 101 uint8_t randomKey[LNN_HUKS_AES_COMMON_SIZE] = {0}; in HWTEST_F() local 103 EXPECT_EQ(LnnGenerateRandomByHuks(randomKey, LNN_HUKS_AES_COMMON_SIZE), SOFTBUS_OK); in HWTEST_F()
|
/foundation/communication/dsoftbus/core/bus_center/lnn/net_ledger/common/include/ |
H A D | lnn_huks_utils.h | 39 int32_t LnnGenerateRandomByHuks(uint8_t *randomKey, uint32_t len);
|
/foundation/communication/dsoftbus/tests/core/bus_center/lnn/net_ledger/ |
H A D | lnn_decision_db_deps_mock.cpp | 74 int32_t LnnGenerateRandomByHuks(uint8_t *randomKey, uint32_t len) in LnnGenerateRandomByHuks() argument 76 return GetDecisionDbDepsInterface()->LnnGenerateRandomByHuks(randomKey, len); in LnnGenerateRandomByHuks()
|
H A D | lnn_decision_db_deps_mock.h | 49 virtual int32_t LnnGenerateRandomByHuks(uint8_t *randomKey, uint32_t len);
|