Home
last modified time | relevance | path

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

1234

/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_chipset_platform_decrypt_test.cpp525 std::vector<uint8_t> plainText(t.cipher.size()); variable
526 struct HksBlob plainBlob = { .size = plainText.size(), .data = plainText.data() };
545 std::vector<uint8_t> plainText(t.cipher.size()); variable
546 struct HksBlob plainBlob = { .size = plainText.size(), .data = plainText.data() };
568 std::vector<uint8_t> plainText(t.cipher.size()); in __anoneda4acad0202() local
569 struct HksBlob plainBlob = { .size = plainText.size(), .data = plainText.data() }; in __anoneda4acad0202()
608 std::vector<uint8_t> plainText(t.cipher.size()); variable
609 struct HksBlob plainBlob = { .size = plainText.size(), .data = plainText.data() };
632 std::vector<uint8_t> plainText(t.cipher.size()); variable
633 struct HksBlob plainBlob = { .size = plainText.size(), .data = plainText.data() };
[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_chipset_platform_encrypt_test.cpp56 .plainText = {
73 .plainText = {
90 .plainText = {
108 .plainText = {
126 .plainText = {
359 int32_t AesGcmEncrypt(const struct HksBlob &wrapKey, const struct HksBlob &plainText, in AesGcmEncrypt() argument
399 ret = HksEncrypt(&wrapKeyAlias, encryptParamSet.s, &plainText, &cipherText); in AesGcmEncrypt()
410 .expectPlain = std::vector<uint8_t>(input.plainText), in Encrypt()
413 …HksBlob plainText = { .size = static_cast<uint32_t>(input.plainText.size()), .data = input.plainTe… in Encrypt() local
434 res.cipher.resize(plainText.size + PLATFORM_KEY_TAG_SIZE); in Encrypt()
[all …]
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()
/base/security/huks/services/huks_standard/huks_engine/main/core/src/
Dhks_chipset_platform_decrypt.c82 static int32_t CheckText(const struct HksBlob *cipherText, const struct HksBlob *plainText) in CheckText() argument
84 if (cipherText->size != plainText->size) { in CheckText()
86 cipherText->size, plainText->size); in CheckText()
89 … if (plainText->size > PLATFORM_KEY_TEXT_MAX_LEN || plainText->size < PLATFORM_KEY_TEXT_MIN_LEN) { in CheckText()
90 HKS_LOG_E("plain text length out of range %" LOG_PUBLIC "d", plainText->size); in CheckText()
138 const struct HksBlob *wrappedKey, struct HksBlob *plainText) in DoAesDecrypt() argument
186 return HksCryptoHalDecrypt(wrappedKey, &decryptSpec, &cipherText, plainText); in DoAesDecrypt()
189 static int32_t CheckInput(const struct HksParamSet *paramSet, struct HksBlob *plainText, in CheckInput() argument
193 int32_t ret = CheckBlob(plainText); in CheckInput()
209 ret = CheckText(&cipherTextParam->blob, plainText); in CheckInput()
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/symmetric_alg_test/
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 …]
/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()
/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 …]
/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/dlp_permission_service/interfaces/inner_api/dlp_parse/src/
Ddlp_crypt.cpp323 …slAesCipherDecryptUpdate(void* cryptoCtx, const struct DlpBlob* message, struct DlpBlob* plainText) in OpensslAesCipherDecryptUpdate() argument
333 …if (EVP_DecryptUpdate(ctx, plainText->data, &outLen, message->data, message->size) != DLP_OPENSSL_… in OpensslAesCipherDecryptUpdate()
337 plainText->size = static_cast<uint32_t>(outLen); in OpensslAesCipherDecryptUpdate()
343 void** cryptoCtx, const struct DlpBlob* message, struct DlpBlob* plainText) in OpensslAesCipherDecryptFinalThree() argument
356 …if (EVP_DecryptUpdate(ctx, plainText->data, &outLen, message->data, message->size) != DLP_OPENSSL_… in OpensslAesCipherDecryptFinalThree()
361 plainText->size = static_cast<uint32_t>(outLen); in OpensslAesCipherDecryptFinalThree()
364 if (EVP_DecryptFinal_ex(ctx, plainText->data + outLen, &outLen) != DLP_OPENSSL_SUCCESS) { in OpensslAesCipherDecryptFinalThree()
369 plainText->size += static_cast<uint32_t>(outLen); in OpensslAesCipherDecryptFinalThree()
379 EVP_CIPHER_CTX* ctx, const struct DlpBlob* message, struct DlpBlob* plainText) in OpensslAesCipherDecryptFinal() argument
383 …if (EVP_DecryptUpdate(ctx, plainText->data, &outLen, message->data, message->size) != DLP_OPENSSL_… in OpensslAesCipherDecryptFinal()
[all …]
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/src/
Dhks_openssl_aes.c209 void *cryptoCtx, const struct HksBlob *message, struct HksBlob *plainText) in OpensslBlockCipherDecryptUpdate() argument
217 …if (EVP_DecryptUpdate(ctx, plainText->data, &outLen, message->data, message->size) != HKS_OPENSSL_… in OpensslBlockCipherDecryptUpdate()
221 plainText->size = (uint32_t)outLen; in OpensslBlockCipherDecryptUpdate()
228 void **cryptoCtx, const struct HksBlob *message, struct HksBlob *plainText) in OpensslBlockCipherDecryptFinalThree() argument
230 return OpensslBlockCipherHandleFinalThree(cryptoCtx, message, plainText, false); in OpensslBlockCipherDecryptFinalThree()
408 …tx, const struct HksUsageSpec *usageSpec, const struct HksBlob *message, struct HksBlob *plainText) in OpensslAesAeadDecryptFinal() argument
419 …if (EVP_DecryptUpdate(ctx, plainText->data, &outLen, message->data, message->size) != HKS_OPENSSL_… in OpensslAesAeadDecryptFinal()
424 plainText->size = (uint32_t)outLen; in OpensslAesAeadDecryptFinal()
433 if (EVP_DecryptFinal_ex(ctx, plainText->data, &outLen) != HKS_OPENSSL_SUCCESS) { in OpensslAesAeadDecryptFinal()
547 const struct HksBlob *message, struct HksBlob *plainText) in OpensslAesAeadDecryptUpdate() argument
[all …]
/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/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/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/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/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/security/dlp_permission_service/interfaces/inner_api/dlp_parse/include/
Ddlp_crypt.h105 const struct DlpBlob* message, struct DlpBlob* plainText);
115 …OpensslAesDecryptUpdate(void* cryptoCtx, const struct DlpBlob* message, struct DlpBlob* plainText);
117 …OpensslAesDecryptFinal(void** cryptoCtx, const struct DlpBlob* message, struct DlpBlob* plainText);
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/asymmetric_alg_test/
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()
/base/security/huks/test/unittest/huks_standard_test/module_test/upgrade_key_test/src/
Dhks_upgrade_key_test.cpp250 uint8_t plainText[] = "plainText123457"; variable
252 struct HksBlob plainBlob = { .size = HKS_ARRAY_SIZE(plainText), .data = plainText};
260 uint8_t decryptedText[HKS_ARRAY_SIZE(plainText) + 1] = { 0 };
268 ret = HksMemCmp(decryptedText, plainText, HKS_ARRAY_SIZE(plainText));
/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/module_test/mock/idl/src/
Dhuks_access_mock.c122 const struct HksBlob *plainText, struct HksBlob *cipherText)) in ENABLE_CFI() argument
124 return HksCoreEncrypt(key, paramSet, plainText, cipherText); in ENABLE_CFI()
128 const struct HksBlob *cipherText, struct HksBlob *plainText)) in ENABLE_CFI() argument
130 return HksCoreDecrypt(key, paramSet, cipherText, plainText); in ENABLE_CFI()

1234