/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
D | hks_aes_cipher_test_common.cpp | 54 …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 …]
|
D | hks_sm4_cipher_test_common.cpp | 45 …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()
|
D | hks_rsa_cipher_test_common.cpp | 82 …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()
|
D | hks_cross_test_common.cpp | 68 …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()
|
D | hks_cross_test.cpp | 78 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/ |
D | hks_test_api_performance.c | 42 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()
|
D | hks_test_aes.c | 385 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/ |
D | hks_test_api_performance.c | 42 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()
|
D | hks_test_aes.c | 383 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/ |
D | hks_rsa_common_mt.cpp | 65 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 …]
|
D | openssl_dsa_helper.c | 156 …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/ |
D | hks_openssl_aes.c | 198 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/ |
D | hks_openssl_aes.h | 47 …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/ |
D | hks_ca_access.c | 54 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/ |
D | setplaintext_fuzzer.cpp | 30 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/ |
D | openssl_dsa_helper.h | 36 …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 …
|
D | openssl_rsa_helper.h | 45 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/ |
D | seturi_fuzzer.cpp | 28 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/ |
D | getmimetype_fuzzer.cpp | 28 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/ |
D | hks_local_engine.h | 37 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/ |
D | hcfciphercreate_fuzzer.cpp | 36 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/ |
D | hks_test_api_performance.h | 31 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/ |
D | hks_test_api_performance.h | 29 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/ |
D | hks_api.c | 312 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/ |
D | hks_core_interfaces.c | 122 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()
|