Home
last modified time | relevance | path

Searched refs:inData (Results 1 – 25 of 127) sorted by relevance

123456

/base/security/huks/interfaces/kits/liteapi/src/
Dhks_lite_api_update_finish_session.cpp30 …(*HksCallSessionFunc)(struct HksBlob *handle, struct HksParamSet *paramSet, struct HksBlob *inData,
33 … HksCallUpdateSession(struct HksBlob *handle, struct HksParamSet *paramSet, struct HksBlob *inData, in HksCallUpdateSession() argument
41 ret = HksUpdate(handle, paramSet, inData, outData); in HksCallUpdateSession()
45 … HksCallFinishSession(struct HksBlob *handle, struct HksParamSet *paramSet, struct HksBlob *inData, in HksCallFinishSession() argument
53 ret = HksFinish(handle, paramSet, inData, outData); in HksCallFinishSession()
57 static int32_t InitOutDataBuffer(struct HksBlob *inData, struct HksBlob *outData) in InitOutDataBuffer() argument
59 outData->size = inData->size + RESERVED_PADDING_AREA; in InitOutDataBuffer()
80 struct HksBlob inData = { 0, nullptr }; in InnerUpdateFinishSession() local
94 ret = HksParseInData(args, ARGS_INDEX_1, &inData); in InnerUpdateFinishSession()
99 ret = InitOutDataBuffer(&inData, &outData); in InnerUpdateFinishSession()
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_sm4_cipher_test_common.cpp24 …const struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherTex… in HksSm4CipherTestEncrypt() argument
34 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksSm4CipherTestEncrypt()
39 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksSm4CipherTestEncrypt()
46 const struct HksBlob *inData) in HksSm4CipherTestDecrypt() argument
61 …EXPECT_EQ(HksMemCmp(inData->data, plainText->data, inData->size), HKS_SUCCESS) << "plainText not e… in HksSm4CipherTestDecrypt()
69 struct HksBlob inData = { in HksSm4CipherTestCaseOther() local
77 inData.size = strlen(tmpInData); in HksSm4CipherTestCaseOther()
78 inData.data = reinterpret_cast<uint8_t *>(tmpInData); in HksSm4CipherTestCaseOther()
91 ret = HksSm4CipherTestEncrypt(keyAlias, encryptParamSet, &inData, &cipherText); in HksSm4CipherTestCaseOther()
97 ret = HksSm4CipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, &inData); in HksSm4CipherTestCaseOther()
Dhks_three_stage_test_common.c44 uint32_t purpose, const struct HksBlob *inData, struct HksBlob *outData) in TestLessThanMaxSeg() argument
53 int32_t ret = HksUpdate(handle, paramSet, inData, &tmpOutData); in TestLessThanMaxSeg()
78 …ate(const struct HksBlob *handle, const struct HksParamSet *paramSet, const struct HksBlob *inData) in HksTestUpdate() argument
80 struct HksBlob inDataSeg = *inData; in HksTestUpdate()
83 uint8_t *lastPtr = inData->data + inData->size - 1; in HksTestUpdate()
117 const struct HksBlob *inData, struct HksBlob *outData) in TestUpdateLoopFinish() argument
119 struct HksBlob inDataSeg = *inData; in TestUpdateLoopFinish()
120 uint8_t *lastPtr = inData->data + inData->size - 1; in TestUpdateLoopFinish()
177 uint32_t purpose, const struct HksBlob *inData, struct HksBlob *outData) in TestUpdateFinish() argument
179 struct HksBlob inDataSeg = *inData; in TestUpdateFinish()
[all …]
Dhks_hkdf_derive_test_common.cpp25 struct HksBlob inData = { in HksHkdfDeriveTestNormalCase() local
45 ret = HksUpdate(&handleDerive, deriveParamSet, &inData, &outData); in HksHkdfDeriveTestNormalCase()
50 ret = HksFinish(&handleDerive, deriveFinalParamsSet, &inData, &outDataDerive); in HksHkdfDeriveTestNormalCase()
59 struct HksBlob inData = { in HksHkdfDeriveTestCmpCase() local
79 ret = HksUpdate(&handleDerive, deriveParamSet, &inData, &outData); in HksHkdfDeriveTestCmpCase()
84 ret = HksFinish(&handleDerive, deriveFinalParamsSet, &inData, &outDataDerive); in HksHkdfDeriveTestCmpCase()
Dhks_pbkdf2_derive_test_common.cpp25 struct HksBlob inData = { in HksPbkdf2DeriveTestNormalCase() local
45 ret = HksUpdate(&handleDerive, deriveParamSet, &inData, &outData); in HksPbkdf2DeriveTestNormalCase()
50 ret = HksFinish(&handleDerive, deriveFinalParamsSet, &inData, &outDataDerive); in HksPbkdf2DeriveTestNormalCase()
60 struct HksBlob inData = { in HksPbkdf2DeriveTestCmpCase() local
80 ret = HksUpdate(&handleDerive, deriveParamSet, &inData, &outData); in HksPbkdf2DeriveTestCmpCase()
85 ret = HksFinish(&handleDerive, deriveFinalParamsSet, &inData, &outDataDerive); in HksPbkdf2DeriveTestCmpCase()
Dhks_cross_test_common.cpp43 …const struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherTex… in HksCrossTestAesEncrypt() argument
53 ret = TestUpdateLoopFinish(&handle, encryptParamSet, inData, cipherText); in HksCrossTestAesEncrypt()
59 ret = HksMemCmp(inData->data, cipherText->data, cipherText->size); in HksCrossTestAesEncrypt()
94 …const struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherTex… in HksCrossTestRsaEncrypt() argument
104 ret = TestUpdateFinish(&handle, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherText); in HksCrossTestRsaEncrypt()
110 ret = HksMemCmp(inData->data, cipherText->data, cipherText->size); in HksCrossTestRsaEncrypt()
145 …const struct HksParamSet *signVerifyParamSet, const struct HksBlob *inData, struct HksBlob *signed… in HksCrossTestSignVerify() argument
162 ret = TestUpdateFinish(&handle, signVerifyParamSet, tmpParam->uint32Param, inData, signedData); in HksCrossTestSignVerify()
173 struct HksBlob inData = { in HksCrossTestHmac() local
180 int32_t ret = HksMac(keyAlias, hmacParamSet, &inData, &mac); in HksCrossTestHmac()
[all …]
Dhks_cross_test.cpp82 struct HksBlob inData = { g_inData.length(), variable
89 ret = HksEncrypt(&keyAlias, encryptParamSet, &inData, &cipherText);
91 …EXPECT_NE(HksMemCmp(inData.data, cipherText.data, cipherText.size), HKS_SUCCESS) << "inData equals…
95 …EXPECT_EQ(HksMemCmp(inData.data, plainText.data, plainText.size), HKS_SUCCESS) << "inData not equa…
125 struct HksBlob inData = { g_inData.length(), variable
132 ret = HksCrossTestAesEncrypt(&keyAlias, encryptParamSet, &inData, &cipherText);
134 …EXPECT_NE(HksMemCmp(inData.data, cipherText.data, cipherText.size), HKS_SUCCESS) << "inData equals…
138 …EXPECT_EQ(HksMemCmp(inData.data, plainText.data, plainText.size), HKS_SUCCESS) << "inData not equa…
172 struct HksBlob inData = { g_inData_32.length(), variable
179 ret = HksEncrypt(&newKeyAlias, encryptParamSet, &inData, &cipherText);
[all …]
Dhks_sm2_sign_verify_test.cpp366 const struct HksBlob *inData, struct HksBlob *outData) in HksTestSignVerify() argument
388 ret = TestUpdateFinish(&handle, paramSet, tmpParam->uint32Param, inData, outData); in HksTestSignVerify()
439 const bool isTestSignData, const struct HksBlob *inData) in HksSm2SignVerifyTestRun() argument
467 ret = HksTestSignVerify(keyAlias, signParamSet, inData, &outDataSign); in HksSm2SignVerifyTestRun()
489 ret = HksTestSignVerify(&importKeyAlias, verifyParamSet, inData, &outDataSign); in HksSm2SignVerifyTestRun()
510 struct HksBlob inData = { g_inData.length(), (uint8_t *)g_inData.c_str() }; variable
512 int ret = HksSm2SignVerifyTestRun(&keyAlias, param, false, &inData);
526 struct HksBlob inData = { g_inData.length(), (uint8_t *)g_inData.c_str() }; variable
531 ret = HksSm2SignVerifyTestRun(&keyAlias, param, false, &inData);
537 ret = HksSm2SignVerifyTestRun(&keyAlias, param, false, &inData);
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/symmetric_alg_test/
Dhks_aes_cipher_test_common.cpp24 …const struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherTex… in HksAesCipherTestEncrypt() argument
34 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksAesCipherTestEncrypt()
39 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksAesCipherTestEncrypt()
43 ret = HksEncrypt(keyAlias, encryptParamSet, inData, &outData); in HksAesCipherTestEncrypt()
55 const struct HksBlob *inData) in HksAesCipherTestDecrypt() argument
70 …EXPECT_EQ(HksMemCmp(inData->data, plainText->data, inData->size), HKS_SUCCESS) << "plainText not e… in HksAesCipherTestDecrypt()
109 struct HksBlob inData = { in HksAesCipherTestCaseOther() local
117 inData.size = strlen(tmpInData); in HksAesCipherTestCaseOther()
118 inData.data = reinterpret_cast<uint8_t *>(tmpInData); in HksAesCipherTestCaseOther()
131 ret = HksAesCipherTestEncrypt(keyAlias, encryptParamSet, &inData, &cipherText); in HksAesCipherTestCaseOther()
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/asymmetric_alg_test/
Dhks_rsa_cipher_test_common.cpp21 …const struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherTex… in HksRsaCipherTestEncryptAbnormal() argument
31 …ret = TestUpdateFinish(&handleEncrypt, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherTex… in HksRsaCipherTestEncryptAbnormal()
38 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksRsaCipherTestEncryptAbnormal()
42 ret = HksEncrypt(keyAlias, encryptParamSet, inData, &outData); in HksRsaCipherTestEncryptAbnormal()
53 …const struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherTex… in HksRsaCipherTestEncrypt() argument
63 …ret = TestUpdateFinish(&handleEncrypt, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherTex… in HksRsaCipherTestEncrypt()
68 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksRsaCipherTestEncrypt()
72 ret = HksEncrypt(keyAlias, encryptParamSet, inData, &outData); in HksRsaCipherTestEncrypt()
83 const struct HksBlob *inData) in HksRsaCipherTestDecrypt() argument
98 …EXPECT_EQ(HksMemCmp(inData->data, plainText->data, inData->size), HKS_SUCCESS) << "plainText not e… in HksRsaCipherTestDecrypt()
[all …]
Dhks_ecc_sign_verify_test_common.cpp23 const struct HksBlob *inData, struct HksBlob *outData, bool isSign) in HksTestSignVerify() argument
40 ret = TestUpdateFinish(&handle, paramSet, tmpParam->uint32Param, inData, outData); in HksTestSignVerify()
49 ret = HksSign(keyAlias, paramSet, inData, &outData1); in HksTestSignVerify()
52 ret = HksVerify(keyAlias, paramSet, inData, outData); in HksTestSignVerify()
62 struct HksBlob inData = { in HksEccSignVerifyTestNormalCase() local
72 inData.size = DATA_ARRAY_AFTER_HASH_LEN[loopIndex]; in HksEccSignVerifyTestNormalCase()
73 inData.data = const_cast<uint8_t *>(g_inDataArrayAfterHash[loopIndex]); in HksEccSignVerifyTestNormalCase()
84 ret = HksTestSignVerify(&keyAlias, signParamSet, &inData, &outDataSign, true); in HksEccSignVerifyTestNormalCase()
100 ret = HksTestSignVerify(&newKeyAlias, verifyParamSet, &inData, &outDataSign, false); in HksEccSignVerifyTestNormalCase()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dopenssl_aes_helper.c125 int32_t AesEncrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBl… in AesEncrypt() argument
128 …if (inData == NULL || inData->data == NULL || inData->size == 0 || outData == NULL || outData->dat… in AesEncrypt()
165 if (EVP_EncryptUpdate(ctx, outData->data, &outLen, inData->data, inData->size) != 1) { in AesEncrypt()
179 int32_t AesDecrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBl… in AesDecrypt() argument
182 …if (inData == NULL || inData->data == NULL || inData->size == 0 || outData == NULL || outData->dat… in AesDecrypt()
219 if (EVP_DecryptUpdate(ctx, outData->data, &outLen, inData->data, inData->size) != 1) { in AesDecrypt()
233 int32_t AesGcmEncrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct Hk… in AesGcmEncrypt() argument
236 …if (inData == NULL || inData->data == NULL || inData->size == 0 || outData == NULL || outData->dat… in AesGcmEncrypt()
271 if (EVP_EncryptUpdate(ctx, outData->data, &outLen, inData->data, inData->size) != 1) { in AesGcmEncrypt()
288 int32_t AesGcmDecrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct Hk… in AesGcmDecrypt() argument
[all …]
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_core_service_three_stage.c99 static int32_t CheckAesCipherAead(bool isEncrypt, const struct HksBlob *inData, in CheckAesCipherAead() argument
103 if (outData->size < (inData->size + HKS_AE_TAG_LEN)) { in CheckAesCipherAead()
105 outData->size, inData->size); in CheckAesCipherAead()
109 if (outData->size < inData->size) { in CheckAesCipherAead()
111 outData->size, inData->size); in CheckAesCipherAead()
119 static int32_t CheckBlockCipherOther(bool isEncrypt, uint32_t padding, const struct HksBlob *inData, in CheckBlockCipherOther() argument
126 if (inData->size % HKS_BLOCK_CIPHER_CBC_BLOCK_SIZE != 0) { in CheckBlockCipherOther()
127 HKS_LOG_E("encrypt cbc no-padding, invalid inSize: %" LOG_PUBLIC "u", inData->size); in CheckBlockCipherOther()
131 … paddingSize = HKS_BLOCK_CIPHER_CBC_BLOCK_SIZE - inData->size % HKS_BLOCK_CIPHER_CBC_BLOCK_SIZE; in CheckBlockCipherOther()
132 if (inData->size > (UINT32_MAX - paddingSize)) { in CheckBlockCipherOther()
[all …]
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/include/
Dopenssl_aes_helper.h33 int32_t AesEncrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBl…
36 int32_t AesDecrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct HksBl…
39 int32_t AesGcmEncrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct Hk…
42 int32_t AesGcmDecrypt(const struct HksParamSet *paramSetIn, const struct HksBlob *inData, struct Hk…
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/asymmetric_alg_test/
Dhks_rsa_cipher_test_common.h53 …t HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet, const struct HksBlob *inData);
55 …t HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet, const struct HksBlob *inData);
57 const struct HksBlob *inData, struct HksBlob *cipherText);
59 const struct HksBlob *inData, struct HksBlob *cipherText);
61 const struct HksBlob *cipherText, struct HksBlob *plainText, const struct HksBlob *inData);
/base/security/huks/frameworks/huks_standard/main/os_dependency/ipc/src/
Dhks_ipc_slice.c55 static uint32_t GetDataSize(uint32_t cmdId, const struct HksBlob *inData, const struct HksBlob *out… in GetDataSize() argument
59 HKS_IF_NOT_SUCC_RETURN(GetBlobBufSize(inData, &inBuffData), HKS_ERROR_INVALID_ARGUMENT) in GetDataSize()
76 struct HksBlob *inData, struct HksBlob *outData) in ProcessDataOnce() argument
82 (GetDataSize(cmdId, inData, outData, &dataBufSize) != HKS_SUCCESS)) { in ProcessDataOnce()
99 ret = HksOnceDataPack(&ipcBlob, inData, outData, NULL, &offset); in ProcessDataOnce()
101 ret = HksOnceDataPack(&ipcBlob, inData, NULL, outData, &offset); in ProcessDataOnce()
119 struct HksBlob *inData, struct HksBlob *outData) in HksSliceDataEntry() argument
129 (GetDataSize(cmdId, inData, outData, &dataBufSize) != HKS_SUCCESS)) { in HksSliceDataEntry()
138 return ProcessDataOnce(cmdId, key, paramSet, inData, outData); in HksSliceDataEntry()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/
Dcert_manager_crypto_operation.c43 int32_t CmGetHash(const struct CmBlob *inData, struct CmBlob *hash) in CmGetHash() argument
45 if ((CmCheckBlob(inData) != CM_SUCCESS) || (CmCheckBlob(hash) != CM_SUCCESS) || in CmGetHash()
57 int32_t ret = EVP_Digest(inData->data, inData->size, hash->data, &hash->size, opensslAlg, NULL); in CmGetHash()
/base/notification/common_event_service/frameworks/extension/test/static_subscriber_proxy_test/
Dstatic_subscriber_proxy_test.cpp66 ErrCode OnReceiveEvent(CommonEventData* inData) override in OnReceiveEvent() argument
85 ErrCode OnReceiveEvent(CommonEventData* inData) override in OnReceiveEvent() argument
105 CommonEventData* inData = nullptr; variable
106 EXPECT_EQ(testProxy->OnReceiveEvent(inData), ERR_OK);
122 CommonEventData* inData = nullptr; variable
123 EXPECT_EQ(testProxy->OnReceiveEvent(inData), 1);
/base/security/certificate_manager/test/unittest/src/
Dcm_update_test.cpp108 struct CmBlob *inData = nullptr; variable
109 int32_t ret = CmUpdate(&g_handle, inData);
121 struct CmBlob inData = { 0, (uint8_t *)g_inDataBuf }; variable
122 int32_t ret = CmUpdate(&g_handle, &inData);
134 struct CmBlob inData = { DEFAULT_INDATA_SIZE, nullptr }; variable
135 int32_t ret = CmUpdate(&g_handle, &inData);
/base/security/huks/interfaces/kits/napi/src/v9/
Dhuks_napi_update_finish_session.cpp43 struct HksBlob *inData = nullptr; member
67 if (context->inData != nullptr) { in DeleteUpdateAsyncContext()
68 if (context->inData->data != nullptr && context->inData->size != 0) { in DeleteUpdateAsyncContext()
69 (void)memset_s(context->inData->data, context->inData->size, 0, context->inData->size); in DeleteUpdateAsyncContext()
71 FreeHksBlob(context->inData); in DeleteUpdateAsyncContext()
91 napi_value inData = nullptr; in FillContextInDataAndOutData() local
94 …s status = napi_get_named_property(env, argv[index], HKS_OPTIONS_PROPERTY_INDATA.c_str(), &inData); in FillContextInDataAndOutData()
95 if (status == napi_ok && inData != nullptr && hasInData) { in FillContextInDataAndOutData()
96 napi_value result = GetUint8Array(env, inData, *context->inData); in FillContextInDataAndOutData()
102 context->inData->size = 0; in FillContextInDataAndOutData()
[all …]
/base/security/huks/interfaces/kits/napi/src/v8/
Dhuks_napi_update_finish.cpp43 struct HksBlob *inData = nullptr; member
67 if (context->inData != nullptr) { in DeleteUpdateAsyncContext()
68 if (context->inData->data != nullptr && context->inData->size != 0) { in DeleteUpdateAsyncContext()
69 (void)memset_s(context->inData->data, context->inData->size, 0, context->inData->size); in DeleteUpdateAsyncContext()
71 FreeHksBlob(context->inData); in DeleteUpdateAsyncContext()
91 napi_value inData = nullptr; in FillContextInDataAndOutData() local
94 …s status = napi_get_named_property(env, argv[index], HKS_OPTIONS_PROPERTY_INDATA.c_str(), &inData); in FillContextInDataAndOutData()
95 if (status == napi_ok && inData != nullptr && hasInData) { in FillContextInDataAndOutData()
96 napi_value result = GetUint8Array(env, inData, *context->inData); in FillContextInDataAndOutData()
102 context->inData->size = 0; in FillContextInDataAndOutData()
[all …]
/base/security/huks/services/huks_standard/huks_engine/main/core/include/
Dhks_core_service_three_stage.h40 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
49 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
52 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
58 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
67 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
79 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
91 const struct HksBlob *inData, struct HksBlob *outData, uint32_t alg);
/base/security/certificate_manager/test/fuzz_test/cmupdate_fuzzer/
Dcmupdate_fuzzer.cpp43 struct CmBlob inData = { 0, nullptr }; in DoSomethingInterestingWithMyAPI() local
44 if (!GetCmBlobFromBuffer(myData, &remainSize, &offset, &inData)) { in DoSomethingInterestingWithMyAPI()
50 (void)CmUpdate(&upHandle, &inData); in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/
Dhks_three_stage_test_common.h36 …te(const struct HksBlob *handle, const struct HksParamSet *paramSet, const struct HksBlob *inData);
38 const struct HksBlob *inData, struct HksBlob *outData);
40 uint32_t purpose, const struct HksBlob *inData, struct HksBlob *outData);
/base/security/certificate_manager/test/fuzz_test/cmfinish_fuzzer/
Dcmfinish_fuzzer.cpp43 struct CmBlob inData = { 0, nullptr }; in DoSomethingInterestingWithMyAPI() local
44 if (!GetCmBlobFromBuffer(myData, &remainSize, &offset, &inData)) { in DoSomethingInterestingWithMyAPI()
56 (void)CmFinish(&fiHandle, &inData, &outData); in DoSomethingInterestingWithMyAPI()

123456