Home
last modified time | relevance | path

Searched refs:plainText (Results 1 – 25 of 61) sorted by relevance

123

/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_aes_cipher_test_common.cpp54 …t struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plainText, in HksAesCipherTestDecrypt() argument
65 ret = TestUpdateLoopFinish(&handleDecrypt, decryptParamSet, cipherText, plainText); in HksAesCipherTestDecrypt()
70 …EXPECT_EQ(HksMemCmp(inData->data, plainText->data, inData->size), HKS_SUCCESS) << "plainText not e… in HksAesCipherTestDecrypt()
79 …EXPECT_EQ(HksMemCmp(outData.data, plainText->data, outData.size), HKS_SUCCESS) << "plainText not e… in HksAesCipherTestDecrypt()
136 struct HksBlob plainText = { AES_COMMON_SIZE, plain }; in HksAesCipherTestCaseOther() local
137 ret = HksAesCipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, &inData); in HksAesCipherTestCaseOther()
192 struct HksBlob plainText = { AES_COMMON_SIZE, plain }; in HksAesCipherTestCaseGcm2() local
193 ret = TestUpdateLoopFinish(&handleDecrypt, decryptParamSet, &cipherText, &plainText); in HksAesCipherTestCaseGcm2()
195 …EXPECT_EQ(HksMemCmp(inData.data, plainText.data, inData.size), HKS_SUCCESS) << "plainText not equa… in HksAesCipherTestCaseGcm2()
196 …EXPECT_EQ(HksMemCmp(plainText1.data, plainText.data, plainText1.size), HKS_SUCCESS) << "plainText … in HksAesCipherTestCaseGcm2()
[all …]
Dhks_sm4_cipher_test_common.cpp45 …t struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plainText, in HksSm4CipherTestDecrypt() argument
56 ret = TestUpdateLoopFinish(&handleDecrypt, decryptParamSet, cipherText, plainText); in HksSm4CipherTestDecrypt()
61 …EXPECT_EQ(HksMemCmp(inData->data, plainText->data, inData->size), HKS_SUCCESS) << "plainText not e… in HksSm4CipherTestDecrypt()
96 struct HksBlob plainText = { SM4_COMMON_SIZE, plain }; in HksSm4CipherTestCaseOther() local
97 ret = HksSm4CipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, &inData); in HksSm4CipherTestCaseOther()
Dhks_rsa_cipher_test_common.cpp82 …t struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plainText, in HksRsaCipherTestDecrypt() argument
93 … TestUpdateFinish(&handleDecrypt, decryptParamSet, HKS_KEY_PURPOSE_DECRYPT, cipherText, plainText); in HksRsaCipherTestDecrypt()
98 …EXPECT_EQ(HksMemCmp(inData->data, plainText->data, inData->size), HKS_SUCCESS) << "plainText not e… in HksRsaCipherTestDecrypt()
107 …EXPECT_EQ(HksMemCmp(outData.data, plainText->data, outData.size), HKS_SUCCESS) << "plainText not e… in HksRsaCipherTestDecrypt()
137 struct HksBlob plainText = { Unittest::RsaCipher::RSA_COMMON_SIZE, plain }; in HksRsaCipherTestCase() local
138 ret = HksRsaCipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, inData); in HksRsaCipherTestCase()
Dhks_cross_test_common.cpp68 …t struct HksParamSet *decryptParamSet, const struct HksBlob *cipherTest, struct HksBlob *plainText) in HksCrossTestAesDecrypt() argument
78 ret = TestUpdateLoopFinish(&handle, decryptParamSet, cipherTest, plainText); in HksCrossTestAesDecrypt()
85 plainText->data, plainText->size); in HksCrossTestAesDecrypt()
119 …t struct HksParamSet *decryptParamSet, const struct HksBlob *cipherTest, struct HksBlob *plainText) in HksCrossTestRsaDecrypt() argument
129 … ret = TestUpdateFinish(&handle, decryptParamSet, HKS_KEY_PURPOSE_DECRYPT, cipherTest, plainText); in HksCrossTestRsaDecrypt()
136 plainText->data, plainText->size); in HksCrossTestRsaDecrypt()
Dhks_cross_test.cpp78 struct HksBlob plainText = { CROSS_COMMON_SIZE, plain }; variable
84 ret = HksCrossTestAesDecrypt(&keyAlias, decryptParamSet, &cipherText, &plainText);
86 …EXPECT_EQ(HksMemCmp(inData.data, plainText.data, plainText.size), HKS_SUCCESS) << "inData not equa…
121 struct HksBlob plainText = { CROSS_COMMON_SIZE, plain }; variable
127 ret = HksDecrypt(&keyAlias, decryptParamSet, &cipherText, &plainText);
129 …EXPECT_EQ(HksMemCmp(inData.data, plainText.data, plainText.size), HKS_SUCCESS) << "inData not equa…
168 struct HksBlob plainText = { CROSS_COMMON_SIZE, plain }; variable
174 ret = HksCrossTestRsaDecrypt(&keyAlias, decryptParamSet, &cipherText, &plainText);
176 …EXPECT_EQ(HksMemCmp(inData.data, plainText.data, plainText.size), HKS_SUCCESS) << "inData not equa…
216 struct HksBlob plainText = { CROSS_COMMON_SIZE, plain }; variable
[all …]
/base/security/huks/test/unittest/huks_lite_test/common/
Dhks_test_api_performance.c42 const struct HksBlob *plainText, struct HksBlob *cipherText, uint32_t performTimes) in HksEncryptRun() argument
55 int32_t ret = HksEncrypt(key, paramSet, plainText, cipherText); in HksEncryptRun()
64 const struct HksBlob *cipherText, struct HksBlob *plainText, uint32_t performTimes) in HksDecryptRun() argument
67 if (plainText != NULL) { in HksDecryptRun()
68 oriPlainTextSize = plainText->size; in HksDecryptRun()
72 if (plainText != NULL) { in HksDecryptRun()
73 (void)memset_s(plainText->data, oriPlainTextSize, 0, oriPlainTextSize); in HksDecryptRun()
74 plainText->size = oriPlainTextSize; in HksDecryptRun()
76 int32_t ret = HksDecrypt(key, paramSet, cipherText, plainText); in HksDecryptRun()
Dhks_test_aes.c385 struct HksBlob plainText = { TEST_AES_256, tmp }; in TestAes256ByAgree() local
386 ret = HksDecrypt(&aesKeyAlias2, paramSet, &cipherText, &plainText); in TestAes256ByAgree()
388 HKS_TEST_LOG_I("ConstructParamSetEncryptDecryptAes plainText: %s", plainText.data); in TestAes256ByAgree()
453 struct HksBlob plainText = { TEST_AES_256, tmp }; in TestAes256ByAgree1() local
454 ret = HksDecrypt(&aesKeyAlias2, paramSet, &cipherText, &plainText); in TestAes256ByAgree1()
456 HKS_TEST_LOG_I("ConstructParamSetEncryptDecryptAes plainText: %s", plainText.data); in TestAes256ByAgree1()
511 struct HksBlob plainText = { TEST_AES_256, tmp }; in TestAes256ByAgree2() local
512 ret = HksDecrypt(&aesKeyAlias2, paramSet, &cipherText, &plainText); in TestAes256ByAgree2()
514 HKS_TEST_LOG_I("ConstructParamSetEncryptDecryptAes plainText: %s", plainText.data); in TestAes256ByAgree2()
579 struct HksBlob plainText = { TEST_AES_256, tmp }; in TestAes256ByLocal() local
[all …]
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/src/
Dhks_test_api_performance.c42 const struct HksBlob *plainText, struct HksBlob *cipherText, uint32_t performTimes) in HksEncryptRun() argument
56 ret = HksEncrypt(key, paramSet, plainText, cipherText); in HksEncryptRun()
65 const struct HksBlob *cipherText, struct HksBlob *plainText, uint32_t performTimes) in HksDecryptRun() argument
69 if (plainText != NULL) { in HksDecryptRun()
70 oriPlainTextSize = plainText->size; in HksDecryptRun()
74 if (plainText != NULL) { in HksDecryptRun()
75 (void)memset_s(plainText->data, oriPlainTextSize, 0, oriPlainTextSize); in HksDecryptRun()
76 plainText->size = oriPlainTextSize; in HksDecryptRun()
78 ret = HksDecrypt(key, paramSet, cipherText, plainText); in HksDecryptRun()
Dhks_test_aes.c383 struct HksBlob plainText = { TEST_AES_256, tmp }; in TestAes256ByAgree() local
384 ret = HksDecrypt(&aesKeyAlias2, paramSet, &cipherText, &plainText); in TestAes256ByAgree()
386 HKS_TEST_LOG_I("ConstructParamSetEncryptDecryptAes plainText: %s", plainText.data); in TestAes256ByAgree()
451 struct HksBlob plainText = { TEST_AES_256, tmp }; in TestAes256ByAgree1() local
452 ret = HksDecrypt(&aesKeyAlias2, paramSet, &cipherText, &plainText); in TestAes256ByAgree1()
454 HKS_TEST_LOG_I("ConstructParamSetEncryptDecryptAes plainText: %s", plainText.data); in TestAes256ByAgree1()
509 struct HksBlob plainText = { TEST_AES_256, tmp }; in TestAes256ByAgree2() local
510 ret = HksDecrypt(&aesKeyAlias2, paramSet, &cipherText, &plainText); in TestAes256ByAgree2()
512 HKS_TEST_LOG_I("ConstructParamSetEncryptDecryptAes plainText: %s", plainText.data); in TestAes256ByAgree2()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/src/
Dhks_rsa_common_mt.cpp65 HksBlob plainText = { in GenerateKeyTestCase() local
76 …EXPECT_EQ(EncryptRsa(&plainText, &cipherText, &publicKey, testCaseParams.padding, testCaseParams.k… in GenerateKeyTestCase()
86 EXPECT_EQ((memcmp(plainText.data, decryptedText.data, decryptedText.size)), 0); in GenerateKeyTestCase()
132 HksBlob plainText = { in EncryptLocalTestCase() local
143 …EXPECT_EQ(HksEncrypt(&publicKey, paramInSet, &plainText, &cipherText), testCaseParams.encryptResul… in EncryptLocalTestCase()
153 EXPECT_EQ((memcmp(plainText.data, decryptedText.data, decryptedText.size)), 0); in EncryptLocalTestCase()
179 HksBlob plainText = { in EncryptServiceTestCase() local
206 … EXPECT_EQ(HksEncrypt(&authId, paramInSet, &plainText, &cipherText), testCaseParams.encryptResult); in EncryptServiceTestCase()
216 EXPECT_EQ((memcmp(plainText.data, decryptedText.data, decryptedText.size)), 0); in EncryptServiceTestCase()
262 HksBlob plainText = { in DecryptLocalTestCase() local
[all …]
Dopenssl_dsa_helper.c156 …const struct HksBlob *plainText, struct HksBlob *signData, struct HksBlob *key, enum HksKeyDigest … in OpensslSignDsa() argument
188 if (EVP_DigestSignUpdate(mctx, plainText->data, plainText->size) != 1) { in OpensslSignDsa()
210 …const struct HksBlob *plainText, struct HksBlob *signData, struct HksBlob *key, enum HksKeyDigest … in OpensslVerifyDsa() argument
242 if (EVP_DigestVerifyUpdate(mctx, plainText->data, plainText->size) != 1) { in OpensslVerifyDsa()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_aes.c198 void *cryptoCtx, const struct HksBlob *message, struct HksBlob *plainText) in OpensslBlockCipherDecryptUpdate() argument
206 …if (EVP_DecryptUpdate(ctx, plainText->data, &outLen, message->data, message->size) != HKS_OPENSSL_… in OpensslBlockCipherDecryptUpdate()
210 plainText->size = (uint32_t)outLen; in OpensslBlockCipherDecryptUpdate()
217 void **cryptoCtx, const struct HksBlob *message, struct HksBlob *plainText) in OpensslBlockCipherDecryptFinalThree() argument
230 …if (EVP_DecryptUpdate(ctx, plainText->data, &outLen, message->data, message->size) != HKS_OPENSSL_… in OpensslBlockCipherDecryptFinalThree()
236 plainText->size = (uint32_t)outLen; in OpensslBlockCipherDecryptFinalThree()
238 if (EVP_DecryptFinal_ex(ctx, plainText->data + outLen, &outLen) != HKS_OPENSSL_SUCCESS) { in OpensslBlockCipherDecryptFinalThree()
243 plainText->size += (uint32_t)outLen; in OpensslBlockCipherDecryptFinalThree()
426 …tx, const struct HksUsageSpec *usageSpec, const struct HksBlob *message, struct HksBlob *plainText) in OpensslAesAeadDecryptFinal() argument
437 …if (EVP_DecryptUpdate(ctx, plainText->data, &outLen, message->data, message->size) != HKS_OPENSSL_… in OpensslAesAeadDecryptFinal()
[all …]
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/include/
Dhks_openssl_aes.h47 …OpensslAesDecryptUpdate(void *cryptoCtx, const struct HksBlob *message, struct HksBlob *plainText);
58 const struct HksBlob *message, struct HksBlob *plainText);
97 void *cryptoCtx, const struct HksBlob *message, struct HksBlob *plainText);
100 void **cryptoCtx, const struct HksBlob *message, struct HksBlob *plainText);
/base/security/huks/services/huks_standard/huks_service/main/os_dependency/ca/
Dhks_ca_access.c54 const struct HksBlob *plainText, struct HksBlob *cipherText) in HksAccessEncrypt() argument
56 return HksTeeEncrypt(key, paramSet, plainText, cipherText); in HksAccessEncrypt()
60 const struct HksBlob *cipherText, struct HksBlob *plainText) in HksAccessDecrypt() argument
62 return HksTeeDecrypt(key, paramSet, cipherText, plainText); in HksAccessDecrypt()
/base/web/webview/test/fuzztest/ohos_adapter/pasteboard_adapter/setplaintext_fuzzer/
Dsetplaintext_fuzzer.cpp30 std::shared_ptr<std::string> plainText = std::make_shared<std::string>(text); in DoSomethingInterestingWithMyAPI() local
31 dataRecordAdapterImpl->SetPlainText(plainText); in DoSomethingInterestingWithMyAPI()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/alg_module_test/include/
Dopenssl_dsa_helper.h36 …const struct HksBlob *plainText, struct HksBlob *signData, struct HksBlob *key, enum HksKeyDigest …
39 …const struct HksBlob *plainText, struct HksBlob *signData, struct HksBlob *key, enum HksKeyDigest …
Dopenssl_rsa_helper.h45 int32_t OpensslSignRsa(const struct HksBlob *plainText, struct HksBlob *signData, struct HksBlob *k…
48 int32_t OpensslVerifyRsa(const struct HksBlob *plainText, struct HksBlob *signData, struct HksBlob …
/base/web/webview/test/fuzztest/ohos_adapter/pasteboard_adapter/seturi_fuzzer/
Dseturi_fuzzer.cpp28 std::shared_ptr<std::string> plainText = std::make_shared<std::string>(text); in DoSomethingInterestingWithMyAPI() local
31 PasteDataRecordAdapter::NewRecord(text, htmlText, plainText); in DoSomethingInterestingWithMyAPI()
/base/web/webview/test/fuzztest/ohos_adapter/pasteboard_adapter/getmimetype_fuzzer/
Dgetmimetype_fuzzer.cpp28 std::shared_ptr<std::string> plainText = std::make_shared<std::string>(text); in DoSomethingInterestingWithMyAPI() local
31 std::make_shared<PasteDataRecordAdapterImpl>(text, htmlText, plainText); in DoSomethingInterestingWithMyAPI()
/base/security/huks/frameworks/huks_standard/main/core/include/
Dhks_local_engine.h37 const struct HksBlob *plainText, struct HksBlob *cipherText);
40 const struct HksBlob *cipherText, struct HksBlob *plainText);
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/
Dhcfciphercreate_fuzzer.cpp36 uint8_t plainText[] = "this is test!"; in AesEncrypt() local
37 HcfBlob input = {.data = reinterpret_cast<uint8_t *>(plainText), .len = 13}; in AesEncrypt()
75 uint8_t plainText[] = "this is test!"; in AesDecrypt() local
110 ret = memcmp(cipherText, plainText, cipherTextLen); in AesDecrypt()
111 ret = ret || (cipherTextLen == sizeof(plainText) - 1) ? 0 : 1; in AesDecrypt()
/base/security/huks/test/unittest/huks_standard_test/interface_inner_test/sdk_test/include/
Dhks_test_api_performance.h31 const struct HksBlob *plainText, struct HksBlob *cipherText, uint32_t performTimes);
34 const struct HksBlob *cipherText, struct HksBlob *plainText, uint32_t performTimes);
/base/security/huks/test/unittest/huks_lite_test/common/include/
Dhks_test_api_performance.h29 const struct HksBlob *plainText, struct HksBlob *cipherText, uint32_t performTimes);
32 const struct HksBlob *cipherText, struct HksBlob *plainText, uint32_t performTimes);
/base/security/huks/interfaces/innerkits/huks_standard/main/src/
Dhks_api.c312 const struct HksBlob *plainText, struct HksBlob *cipherText) in HksEncrypt() argument
316 if ((key == NULL) || (paramSet == NULL) || (plainText == NULL) || (cipherText == NULL)) { in HksEncrypt()
323 ret = HksLocalEncrypt(key, paramSet, plainText, cipherText); in HksEncrypt()
328 ret = HksClientEncrypt(key, paramSet, plainText, cipherText); in HksEncrypt()
337 (void)plainText; in HksEncrypt()
344 const struct HksBlob *cipherText, struct HksBlob *plainText) in HksDecrypt() argument
348 if ((key == NULL) || (paramSet == NULL) || (cipherText == NULL) || (plainText == NULL)) { in HksDecrypt()
355 ret = HksLocalDecrypt(key, paramSet, cipherText, plainText); in HksDecrypt()
360 ret = HksClientDecrypt(key, paramSet, cipherText, plainText); in HksDecrypt()
369 (void)plainText; in HksDecrypt()
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_core_interfaces.c122 const struct HksBlob *plainText, struct HksBlob *cipherText) in HuksHdiEncrypt() argument
124 return HksCoreEncrypt(key, paramSet, plainText, cipherText); in HuksHdiEncrypt()
128 const struct HksBlob *cipherText, struct HksBlob *plainText) in HuksHdiDecrypt() argument
130 return HksCoreDecrypt(key, paramSet, cipherText, plainText); in HuksHdiDecrypt()

123