Home
last modified time | relevance | path

Searched refs:hashData (Results 1 - 16 of 16) sorted by relevance

/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/
H A Dcipher_sm2_crypto_util_openssl.c41 if (OpensslAsn1OctetStringSet(sm2Text->c3, spec->hashData.data, spec->hashData.len) != HCF_OPENSSL_SUCCESS) { in BuildSm2Ciphertext()
110 tempSpec->hashData.data = (unsigned char *)HcfMalloc(c3Len, 0); in BuildSm2CiphertextSpec()
111 if (tempSpec->hashData.data == NULL) { in BuildSm2CiphertextSpec()
112 LOGE("Failed to allocate hashData.data memory"); in BuildSm2CiphertextSpec()
116 (void)memcpy_s(tempSpec->hashData.data, c3Len, c3Data, c3Len); in BuildSm2CiphertextSpec()
118 tempSpec->hashData.len = c3Len; in BuildSm2CiphertextSpec()
/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/
H A Dhks_crypto_hal_sm3_cipher.cpp96 uint8_t hashData[19] = {0}; in HWTEST_F() local
97 struct HksBlob hash = { 19, hashData }; in HWTEST_F()
118 uint8_t hashData[32] = {0}; in HWTEST_F() local
119 struct HksBlob hash = { 32, hashData }; in HWTEST_F()
140 uint8_t hashData[46] = {0}; in HWTEST_F() local
141 struct HksBlob hash = { 46, hashData }; in HWTEST_F()
H A Dhks_crypto_hal_dsa_sign.cpp110 uint8_t hashData[HKS_HMAC_DIGEST_SHA512_LEN] = {0}; in RunTestCase() local
111 struct HksBlob hash = { HKS_HMAC_DIGEST_SHA512_LEN, hashData }; in RunTestCase()
H A Dhks_crypto_hal_ecdsa_sign.cpp530 uint8_t hashData[HKS_HMAC_DIGEST_SHA512_LEN] = {0}; in RunTestCase() local
531 struct HksBlob hash = { HKS_HMAC_DIGEST_SHA512_LEN, hashData }; in RunTestCase()
H A Dhks_crypto_hal_rsa_sign.cpp1477 uint8_t hashData[HKS_HMAC_DIGEST_SHA512_LEN] = {0}; in RunTestCase() local
1478 struct HksBlob hash = { HKS_HMAC_DIGEST_SHA512_LEN, hashData }; in RunTestCase()
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfsm2create_fuzzer/
H A Dhcfsm2create_fuzzer.cpp76 tempSpec->hashData.data = g_hashData; in ConstructCorrectSm2CipherTextXSpec()
77 tempSpec->hashData.len = HASH_DATA_LEN; in ConstructCorrectSm2CipherTextXSpec()
94 tempSpec->hashData.data = g_hashData; in ConstructCorrectSm2CipherTextYSpec()
95 tempSpec->hashData.len = HASH_DATA_LEN; in ConstructCorrectSm2CipherTextYSpec()
112 tempSpec->hashData.data = g_hashData; in ConstructCorrectSm2CipherTextSpec()
113 tempSpec->hashData.len = HASH_DATA_LEN; in ConstructCorrectSm2CipherTextSpec()
230 spec.hashData.data = g_hashData; in HcfSm2CreateFuzzTest()
231 spec.hashData.len = HASH_DATA_LEN; in HcfSm2CreateFuzzTest()
/base/security/device_auth/test/unittest/deviceauth/unit_test/source/
H A Dkey_management_test.cpp58 uint8_t hashData[KEY_BYTES_CURVE25519] = { 0 }; in HWTEST_F() local
61 struct HksBlob invalidSizeBlob = { 0, hashData }; in HWTEST_F()
72 uint8_t hashData[SHA256_LEN] = { 0 }; in HWTEST_F() local
74 Uint8Buff hashBuffer = { hashData, SHA256_LEN }; in HWTEST_F()
76 Uint8Buff invalidBuffer = { hashData, 0 }; in HWTEST_F()
77 Uint8Buff shortPointBuffer = { hashData, EC_LEN - 1 }; in HWTEST_F()
111 uint8_t hashData[SHA_256_LENGTH] = { 0 }; in HWTEST_F() local
113 Uint8Buff hashBuff = { hashData, SHA_256_LENGTH }; in HWTEST_F()
/base/security/crypto_framework/test/unittest/src/sm2/
H A Dcrypto_sm2_util_test.cpp96 tempSpec->hashData.data = g_hashData; in ConstructCorrectSm2CipherTextSpec()
97 tempSpec->hashData.len = HASH_DATA_LEN; in ConstructCorrectSm2CipherTextSpec()
112 tempSpec->hashData.data = g_hashData; in ConstructMissYErrorSm2CipherTextSpec()
113 tempSpec->hashData.len = HASH_DATA_LEN; in ConstructMissYErrorSm2CipherTextSpec()
128 tempSpec->hashData.data = g_hashData; in ConstructMissXErrorSm2CipherTextSpec()
129 tempSpec->hashData.len = HASH_DATA_LEN; in ConstructMissXErrorSm2CipherTextSpec()
160 tempSpec->hashData.data = g_hashData; in ConstructMissCipherDataErrorSm2CipherTextSpec()
161 tempSpec->hashData.len = HASH_DATA_LEN; in ConstructMissCipherDataErrorSm2CipherTextSpec()
168 // hashData.len != 32 in ConstructLenErrorSm2CipherTextSpec()
177 tempSpec->hashData in ConstructLenErrorSm2CipherTextSpec()
[all...]
/base/security/crypto_framework/frameworks/crypto_operation/
H A Dsm2_crypto_util.c78 if ((spec->hashData.data == NULL) || (spec->hashData.len == 0)) { in CheckSm2CipherTextSpec()
79 LOGE("Spec.hashData is null"); in CheckSm2CipherTextSpec()
86 if (spec->hashData.len != HCF_SM2_C3_LEN) { in CheckSm2CipherTextSpec()
87 LOGE("Invalid param hashData"); in CheckSm2CipherTextSpec()
/base/security/huks/frameworks/huks_standard/main/os_dependency/sysinfo/src/
H A Dhks_get_udid.c53 struct HksBlob hashData = { HKS_HARDWARE_UDID_LEN, devUdid }; in HksGetHardwareUdid() local
54 ret = ComputeHash(devUdidString, sizeof(devUdidString), &hashData); in HksGetHardwareUdid()
/base/hiviewdfx/hitrace/frameworks/native/
H A Dhitracechainc.c243 uint32_t hashData[hashDataNum]; in HiTraceChainCreateSpan() local
244 hashData[0] = (uint32_t)(HiTraceChainGetDeviceId()); // 0: device id in HiTraceChainCreateSpan()
245 hashData[1] = id.parentSpanId; // 1: parent span id in HiTraceChainCreateSpan()
246 hashData[2] = id.spanId; // 2: span id in HiTraceChainCreateSpan()
247 hashData[3] = (uint32_t)(tv.tv_sec); // 3: second in HiTraceChainCreateSpan()
248 hashData[4] = (uint32_t)(tv.tv_usec); // 4: usecond in HiTraceChainCreateSpan()
250 uint32_t hash = HashFunc(hashData, hashDataNum * sizeof(uint32_t)); in HiTraceChainCreateSpan()
/base/security/crypto_framework/interfaces/inner_api/algorithm_parameter/
H A Dsm2_crypto_params.h26 HcfBlob hashData; member
/base/hiviewdfx/hitrace/test/unittest/common/native/
H A Dhitracechainc_test.cpp88 uint64_t hashData[HASH_DATA_LENGTH]; in GenerateChainId() local
92 hashData[ARRAY_FIRST_INDEX] = tv.tv_sec; in GenerateChainId()
93 hashData[ARRAY_SECOND_INDEX] = tv.tv_usec; in GenerateChainId()
94 hashData[ARRAY_THIRD_INDEX] = randomNum; in GenerateChainId()
95 uint64_t hash = HashFunc(hashData, HASH_DATA_LENGTH * sizeof(uint64_t)); in GenerateChainId()
102 uint64_t hashData[HASH_DATA_LENGTH]; in GenerateSpanId() local
106 hashData[ARRAY_FIRST_INDEX] = randomNum; in GenerateSpanId()
107 hashData[ARRAY_SECOND_INDEX] = tv.tv_sec; in GenerateSpanId()
108 hashData[ARRAY_THIRD_INDEX] = tv.tv_usec; in GenerateSpanId()
109 uint64_t hash = HashFunc(hashData, HASH_DATA_LENGT in GenerateSpanId()
116 uint64_t hashData[HASH_DATA_LENGTH]; GenerateParentSpanId() local
[all...]
H A Dhitracechaincpp_test.cpp59 uint64_t hashData[HASH_DATA_LENGTH]; in GenerateChainId() local
63 hashData[ARRAY_FIRST_INDEX] = tv.tv_sec; in GenerateChainId()
64 hashData[ARRAY_SECOND_INDEX] = tv.tv_usec; in GenerateChainId()
65 hashData[ARRAY_THIRD_INDEX] = randomNum; in GenerateChainId()
66 uint64_t hash = HashFunc(hashData, HASH_DATA_LENGTH * sizeof(uint64_t)); in GenerateChainId()
74 uint64_t hashData[HASH_DATA_LENGTH]; in GenerateSpanId() local
78 hashData[ARRAY_FIRST_INDEX] = randomNum; in GenerateSpanId()
79 hashData[ARRAY_SECOND_INDEX] = tv.tv_sec; in GenerateSpanId()
80 hashData[ARRAY_THIRD_INDEX] = tv.tv_usec; in GenerateSpanId()
81 uint64_t hash = HashFunc(hashData, HASH_DATA_LENGT in GenerateSpanId()
88 uint64_t hashData[HASH_DATA_LENGTH]; GenerateParentSpanId() local
[all...]
/base/security/crypto_framework/frameworks/js/napi/crypto/src/
H A Dnapi_sm2_crypto_util.cpp82 LOGE("Failed to get valid hashData."); in GetSm2CipherTextSpecFromNapiValue()
89 tempSpec->hashData = *hashDataBlob; in GetSm2CipherTextSpecFromNapiValue()
176 if (spec->hashData.data == nullptr || spec->hashData.len == 0) { in CheckSm2CipherTextSpec()
177 LOGE("Invalid hashData!"); in CheckSm2CipherTextSpec()
208 if (!BuildBlobNapiValue(env, &(spec->hashData), SM2_UTIL_PARAM_HASH_DATA.c_str(), instance)) { in BuildSm2CipherTextSpecToNapiValue()
209 LOGE("Build hashData failed!"); in BuildSm2CipherTextSpecToNapiValue()
/base/security/crypto_framework/common/src/
H A Dasy_key_params.c481 HcfBlobDataFree(&(spec->hashData)); in DestroySm2CipherTextSpec()

Completed in 10 milliseconds