/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/symmetric_alg_test/ |
H A D | hks_aes_cipher_part3_test.cpp | 821 HksFreeParamSet(&encryptParamSet); 851 HksFreeParamSet(&encryptParamSet); 886 HksFreeParamSet(&encryptParamSet); 916 HksFreeParamSet(&encryptParamSet); 947 HksFreeParamSet(&encryptParamSet); 977 HksFreeParamSet(&encryptParamSet); 1009 HksFreeParamSet(&encryptParamSet); 1082 HksFreeParamSet(&encryptParamSet); 1136 HksFreeParamSet(&encryptParamSet); 1181 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_aes_cipher_part1_test.cpp | 545 struct HksParamSet *encryptParamSet = nullptr; variable 557 HksFreeParamSet(&encryptParamSet); 576 struct HksParamSet *encryptParamSet = nullptr; variable 588 HksFreeParamSet(&encryptParamSet); 623 HksFreeParamSet(&encryptParamSet); 653 HksFreeParamSet(&encryptParamSet); 684 HksFreeParamSet(&encryptParamSet); 714 HksFreeParamSet(&encryptParamSet); 750 HksFreeParamSet(&encryptParamSet); 781 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_aes_cipher_part2_test.cpp | 546 struct HksParamSet *encryptParamSet = nullptr; variable 558 HksFreeParamSet(&encryptParamSet); 576 struct HksParamSet *encryptParamSet = nullptr; variable 588 HksFreeParamSet(&encryptParamSet); 623 HksFreeParamSet(&encryptParamSet); 653 HksFreeParamSet(&encryptParamSet); 684 HksFreeParamSet(&encryptParamSet); 714 HksFreeParamSet(&encryptParamSet); 750 HksFreeParamSet(&encryptParamSet); 780 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_aes_cipher_test_common.cpp | 34 int32_t ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksAesCipherTestEncrypt() 40 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksAesCipherTestEncrypt() 49 ret = HksEncryptForDe(keyAlias, encryptParamSet, inData, &outData); in HksAesCipherTestEncrypt() 81 ret = HksBuildAuthtoken(&encryptParamSet, &challengeBlob, testIDMParams); in HksAesCipherTestEncryptWithoutNonce() 89 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksAesCipherTestEncryptWithoutNonce() 131 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet) in HksAesCipherTestParamAbsentCase() argument 143 ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksAesCipherTestParamAbsentCase() 152 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet) in HksAesCipherTestCaseOther() argument 519 ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); 572 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet) [all …]
|
H A D | hks_aes_cipher_part4_test.cpp | 408 struct HksParamSet *encryptParamSet = nullptr; variable 409 …ret = InitParamSet(&encryptParamSet, g_encryptParams026, sizeof(g_encryptParams026) / sizeof(HksPa… 416 ret = HksAesCipherTestCaseGcm3(&keyAlias, genParamSet, encryptParamSet, decryptParamSet, false); 420 HksFreeParamSet(&encryptParamSet); 439 struct HksParamSet *encryptParamSet = nullptr; variable 440 …ret = InitParamSet(&encryptParamSet, g_encryptParams027, sizeof(g_encryptParams027) / sizeof(HksPa… 456 ret = HksInitForDe(&keyAlias, encryptParamSet, &handleEncrypt, &challengeBlob); 460 HksFreeParamSet(&encryptParamSet); 478 struct HksParamSet *encryptParamSet = nullptr; variable 486 ret = HksAesCipherTestCaseGcm3(&keyAlias, genParamSet, encryptParamSet, decryptParamSet, true); [all …]
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/asymmetric_alg_test/ |
H A D | hks_rsa_cipher_part5_test.cpp | 327 struct HksParamSet *encryptParamSet = nullptr; variable 339 HksFreeParamSet(&encryptParamSet); 359 struct HksParamSet *encryptParamSet = nullptr; variable 371 HksFreeParamSet(&encryptParamSet); 401 struct HksParamSet *encryptParamSet = nullptr; variable 444 HksFreeParamSet(&encryptParamSet); 474 struct HksParamSet *encryptParamSet = nullptr; variable 501 HksFreeParamSet(&encryptParamSet); 549 HksFreeParamSet(&encryptParamSet); 582 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_rsa_cipher_test_common.cpp | 22 …const struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherTex… in HksRsaCipherTestEncryptAbnormal() argument 26 int32_t ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksRsaCipherTestEncryptAbnormal() 32 …ret = TestUpdateFinish(&handleEncrypt, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherTex… in HksRsaCipherTestEncryptAbnormal() 35 int32_t abortRet = HksAbort(&handleEncrypt, encryptParamSet); in HksRsaCipherTestEncryptAbnormal() 43 ret = HksEncryptForDe(keyAlias, encryptParamSet, inData, &outData); in HksRsaCipherTestEncryptAbnormal() 58 int32_t ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksRsaCipherTestEncrypt() 73 ret = HksEncryptForDe(keyAlias, encryptParamSet, inData, &outData); in HksRsaCipherTestEncrypt() 128 ret = HksImportKeyForDe(&newKeyAlias, encryptParamSet, &publicKey); in HksRsaCipherTestCase() 133 ret = HksRsaCipherTestEncrypt(&newKeyAlias, encryptParamSet, inData, &cipherText); in HksRsaCipherTestCase() 164 ret = HksImportKeyForDe(&newKeyAlias, encryptParamSet, &publicKey); in HksRsaCipherTestCaseAbnormal() [all …]
|
H A D | hks_rsa_cipher_part1_test.cpp | 713 struct HksParamSet *encryptParamSet = nullptr; variable 725 HksFreeParamSet(&encryptParamSet); 758 HksFreeParamSet(&encryptParamSet); 790 HksFreeParamSet(&encryptParamSet); 822 HksFreeParamSet(&encryptParamSet); 854 HksFreeParamSet(&encryptParamSet); 886 HksFreeParamSet(&encryptParamSet); 918 HksFreeParamSet(&encryptParamSet); 951 HksFreeParamSet(&encryptParamSet); 984 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_rsa_cipher_part2_test.cpp | 715 struct HksParamSet *encryptParamSet = nullptr; variable 727 HksFreeParamSet(&encryptParamSet); 759 HksFreeParamSet(&encryptParamSet); 791 HksFreeParamSet(&encryptParamSet); 823 HksFreeParamSet(&encryptParamSet); 856 HksFreeParamSet(&encryptParamSet); 890 HksFreeParamSet(&encryptParamSet); 922 HksFreeParamSet(&encryptParamSet); 954 HksFreeParamSet(&encryptParamSet); 986 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_rsa_cipher_part3_test.cpp | 720 struct HksParamSet *encryptParamSet = nullptr; variable 731 HksFreeParamSet(&encryptParamSet); 765 HksFreeParamSet(&encryptParamSet); 798 HksFreeParamSet(&encryptParamSet); 831 HksFreeParamSet(&encryptParamSet); 863 HksFreeParamSet(&encryptParamSet); 896 HksFreeParamSet(&encryptParamSet); 928 HksFreeParamSet(&encryptParamSet); 960 HksFreeParamSet(&encryptParamSet); 993 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_rsa_cipher_part4_test.cpp | 717 struct HksParamSet *encryptParamSet = nullptr; variable 729 HksFreeParamSet(&encryptParamSet); 761 HksFreeParamSet(&encryptParamSet); 794 HksFreeParamSet(&encryptParamSet); 826 HksFreeParamSet(&encryptParamSet); 858 HksFreeParamSet(&encryptParamSet); 891 HksFreeParamSet(&encryptParamSet); 924 HksFreeParamSet(&encryptParamSet); 957 HksFreeParamSet(&encryptParamSet); 989 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_sm2_cipher_test.cpp | 364 int32_t ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksSm2CipherTestEncrypt() 378 ret = HksEncryptForDe(keyAlias, encryptParamSet, inData, &outData); in HksSm2CipherTestEncrypt() 427 struct HksParamSet *genParamSet, *encryptParamSet, *decryptParamSet; in HksSm2CipherTestRun() local 431 ret = InitParamSet(&encryptParamSet, param.encrypt.params.data(), param.encrypt.params.size()); in HksSm2CipherTestRun() 450 ret = HksImportKeyForDe(&newKeyAlias, encryptParamSet, &publicKey); in HksSm2CipherTestRun() 457 ret = HksSm2CipherTestEncrypt(&newKeyAlias, encryptParamSet, inData, cipherText); in HksSm2CipherTestRun() 475 FreeBuffAndDeleteKey(&genParamSet, &encryptParamSet, &decryptParamSet, keyAlias, &newKeyAlias); in HksSm2CipherTestRun() 628 struct HksParamSet *genParamSet, *encryptParamSet, *decryptParamSet; in HksSm2CipherTestRunByNdk() local 632 ret = InitParamSet(&encryptParamSet, param.encrypt.params.data(), param.encrypt.params.size()); in HksSm2CipherTestRunByNdk() 661 ret = HksSm2CipherTestEncryptByNdk(&newKeyAlias, encryptParamSet, inData, &cipherText); in HksSm2CipherTestRunByNdk() [all …]
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/ |
H A D | hks_sm4_cipher_part_test.cpp | 1012 HksFreeParamSet(&encryptParamSet); 1037 HksFreeParamSet(&encryptParamSet); 1062 HksFreeParamSet(&encryptParamSet); 1088 HksFreeParamSet(&encryptParamSet); 1113 HksFreeParamSet(&encryptParamSet); 1143 HksFreeParamSet(&encryptParamSet); 1172 HksFreeParamSet(&encryptParamSet); 1201 HksFreeParamSet(&encryptParamSet); 1234 HksFreeParamSet(&encryptParamSet); 1264 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_agree_test_common.cpp | 76 …AgreedKeyEncryptDecrypt(const struct HksBlob *keyAlias1, const struct HksParamSet *encryptParamSet, in TestAgreedKeyEncryptDecrypt() argument 85 int32_t ret = HksEncryptForDe(keyAlias1, encryptParamSet, &plaindata, &cipherData); in TestAgreedKeyEncryptDecrypt() 104 struct HksParamSet *encryptParamSet = nullptr; in TestAgreedKeyUse() local 108 …ret = InitParamSet(&encryptParamSet, g_agreedKeyEncrypt001, HKS_ARRAY_SIZE(g_agreedKeyEncrypt001)); in TestAgreedKeyUse() 114 ret = TestAgreedKeyEncryptDecrypt(keyAlias1, encryptParamSet, keyAlias2, decryptParamSet); in TestAgreedKeyUse() 118 HksFreeParamSet(&encryptParamSet); in TestAgreedKeyUse() 125 struct HksParamSet *encryptParamSet = nullptr; in TestDerivedKeyUse() local 129 …ret = InitParamSet(&encryptParamSet, g_agreedKeyEncrypt001, HKS_ARRAY_SIZE(g_agreedKeyEncrypt001)); in TestDerivedKeyUse() 135 ret = TestAgreedKeyEncryptDecrypt(keyAlias, encryptParamSet, keyAlias, decryptParamSet); in TestDerivedKeyUse() 139 HksFreeParamSet(&encryptParamSet); in TestDerivedKeyUse()
|
H A D | hks_batch_test.cpp | 784 struct HksParamSet *encryptParamSet = nullptr; variable 796 HksFreeParamSet(&encryptParamSet); 814 struct HksParamSet *encryptParamSet = nullptr; variable 826 HksFreeParamSet(&encryptParamSet); 871 struct HksParamSet *encryptParamSet = nullptr; variable 928 HksFreeParamSet(&encryptParamSet); 947 struct HksParamSet *encryptParamSet = nullptr; variable 959 HksFreeParamSet(&encryptParamSet); 977 struct HksParamSet *encryptParamSet = nullptr; variable 989 HksFreeParamSet(&encryptParamSet); [all …]
|
H A D | hks_sm4_cipher_test_common.cpp | 25 …const struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherTex… in HksSm4CipherTestEncrypt() argument 29 int32_t ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksSm4CipherTestEncrypt() 35 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksSm4CipherTestEncrypt() 67 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet) in HksSm4CipherTestCaseOther() argument 92 ret = HksSm4CipherTestEncrypt(keyAlias, encryptParamSet, &inData, &cipherText); in HksSm4CipherTestCaseOther() 108 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet) in HksSm4CipherTestCaseGcm() argument 127 ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in HksSm4CipherTestCaseGcm() 132 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, &inData, &cipherText); in HksSm4CipherTestCaseGcm()
|
H A D | hks_ce_update_test.cpp | 385 int32_t ret = HksInitForDe(keyAlias, encryptParamSet, &handleEncrypt, nullptr); in EncryptOnThreeStage() 392 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, plainBlob, cipherBlob); in EncryptOnThreeStage() 508 struct HksParamSet *encryptParamSet = nullptr; variable 518 ret = HksEncryptForDe(&g_validKeyAlias[i], encryptParamSet, &plainBlob, &cipherBlob); 532 HksFreeParamSet(&encryptParamSet); 547 struct HksParamSet *encryptParamSet = nullptr; variable 569 HksFreeParamSet(&encryptParamSet); 584 struct HksParamSet *encryptParamSet = nullptr; variable 623 HksFreeParamSet(&encryptParamSet); 638 struct HksParamSet *encryptParamSet = nullptr; variable [all …]
|
H A D | hks_cross_test.cpp | 70 struct HksParamSet *encryptParamSet = nullptr; variable 84 ret = HksEncryptForDe(&keyAlias, encryptParamSet, &inData, &cipherText); 94 HksFreeParamSet(&encryptParamSet); 113 struct HksParamSet *encryptParamSet = nullptr; variable 127 ret = HksCrossTestAesEncrypt(&keyAlias, encryptParamSet, &inData, &cipherText); 137 HksFreeParamSet(&encryptParamSet); 155 struct HksParamSet *encryptParamSet = nullptr; variable 174 ret = HksEncryptForDe(&newKeyAlias, encryptParamSet, &inData, &cipherText); 185 HksFreeParamSet(&encryptParamSet); 203 struct HksParamSet *encryptParamSet = nullptr; variable [all …]
|
/ohos5.0/base/security/huks/test/reliability/src/ |
H A D | three_stage_multi_thread.cpp | 165 struct HksParamSet *encryptParamSet = nullptr; in InitSessionTest() local 168 ret = HksInit(&keyAlias, encryptParamSet, handle, nullptr); in InitSessionTest() 170 HksFreeParamSet(&encryptParamSet); in InitSessionTest() 176 struct HksParamSet *encryptParamSet = nullptr; in UpdateSessionTest() local 186 ret = HksUpdate(handle, encryptParamSet, &indataBlob, &outdataBlob); in UpdateSessionTest() 188 HksFreeParamSet(&encryptParamSet); in UpdateSessionTest() 196 struct HksParamSet *encryptParamSet = nullptr; in FinishSessionTest() local 208 HksFreeParamSet(&encryptParamSet); in FinishSessionTest() 216 struct HksParamSet *encryptParamSet = nullptr; in AbortSessionTest() local 219 ret = HksAbort(handle, encryptParamSet); in AbortSessionTest() [all …]
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/symmetric_alg_test/ |
H A D | hks_aes_cipher_test_common.h | 38 … HksAesCipherTestEncrypt(const struct HksBlob *keyAlias, const struct HksParamSet *encryptParamSet, 43 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet); 45 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet); 47 …struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet, struct HksParamSet *decr… 49 … struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet, bool needAccessControl); 51 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet, bool isTimeOut); 53 struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet); 54 int32_t HksAesEncryptThreeStage(const struct HksBlob *keyAlias, struct HksParamSet *encryptParamSet,
|
/ohos5.0/base/web/webview/ohos_adapter/keystore_adapter/src/ |
H A D | keystore_adapter_impl.cpp | 142 struct HksParamSet *encryptParamSet = nullptr; in EncryptKey() local 160 …ohResult = InitParamSet(&encryptParamSet, g_encryptParams, sizeof(g_encryptParams) / sizeof(HksPar… in EncryptKey() 164 HksFreeParamSet(&encryptParamSet); in EncryptKey() 169 ohResult = HksInit(&keyAlias, encryptParamSet, &handleEncrypt, nullptr); in EncryptKey() 173 HksFreeParamSet(&encryptParamSet); in EncryptKey() 176 ohResult = HksFinish(&handleEncrypt, encryptParamSet, &inData, &cipherText); in EncryptKey() 180 HksFreeParamSet(&encryptParamSet); in EncryptKey() 185 HksFreeParamSet(&encryptParamSet); in EncryptKey()
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/three_stage_test/include/asymmetric_alg_test/ |
H A D | hks_rsa_cipher_test_common.h | 53 …struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet, const struct HksBlob *in… 55 …struct HksParamSet *encryptParamSet, struct HksParamSet *decryptParamSet, const struct HksBlob *in… 56 … HksRsaCipherTestEncrypt(const struct HksBlob *keyAlias, const struct HksParamSet *encryptParamSet, 58 …ipherTestEncryptAbnormal(const struct HksBlob *keyAlias, const struct HksParamSet *encryptParamSet,
|
/ohos5.0/docs/zh-cn/application-dev/security/UniversalKeystoreKit/ |
H A D | huks-encryption-decryption-ndk.md | 149 …const struct OH_Huks_ParamSet *encryptParamSet, const struct OH_Huks_Blob *inData, struct OH_Huks_… 153 OH_Huks_Result ret = OH_Huks_InitSession(keyAlias, encryptParamSet, &handleEncrypt, nullptr); 157 ret = OH_Huks_FinishSession(&handleEncrypt, encryptParamSet, inData, cipherText); 179 struct OH_Huks_ParamSet *encryptParamSet = nullptr; 213 …ohResult = InitParamSet(&encryptParamSet, g_encryptParams, sizeof(g_encryptParams) / sizeof(OH_Huk… 227 ohResult = HksAesCipherTestEncrypt(&keyAlias, encryptParamSet, &inData, &cipherText); 267 OH_Huks_FreeParamSet(&encryptParamSet);
|
/ohos5.0/base/security/huks/test/unittest/huks_standard_test/module_test/upgrade_key_test/src/ |
H A D | hks_upgrade_key_test.cpp | 171 struct HksParamSet *encryptParamSet = nullptr; in TestDoEncrypt() local 172 int32_t ret = HksInitParamSet(&encryptParamSet); in TestDoEncrypt() 174 ret = HksAddParams(encryptParamSet, encParams, encParamsCnt); in TestDoEncrypt() 176 ret = HksBuildParamSet(&encryptParamSet); in TestDoEncrypt() 179 ret = HksEncrypt(keyAlias, encryptParamSet, plainBlob, cipherBlob); in TestDoEncrypt() 181 HksFreeParamSet(&encryptParamSet); in TestDoEncrypt()
|
/ohos5.0/base/telephony/core_service/utils/common/src/ |
H A D | tel_aes_crypto_util.cpp | 113 struct HksParamSet *encryptParamSet = nullptr; in AesCryptoEncrypt() local 128 ret = InitParamSet(&encryptParamSet, encryptParams, sizeof(encryptParams) / sizeof(HksParam)); in AesCryptoEncrypt() 132 HksFreeParamSet(&encryptParamSet); in AesCryptoEncrypt() 136 … std::string encryptData = AesCryptoEncryptInner(&keyAlias, genParamSet, encryptParamSet, srcData); in AesCryptoEncrypt() 138 HksFreeParamSet(&encryptParamSet); in AesCryptoEncrypt() 200 … struct HksParamSet *genParamSet, struct HksParamSet *encryptParamSet, const std::string &srcData) in AesCryptoEncryptInner() argument 220 ret = HksInit(keyAlias, encryptParamSet, &handle, nullptr); in AesCryptoEncryptInner() 231 ret = AesCryptoLoopUpdate(&handle, encryptParamSet, &inData, &cipherText); in AesCryptoEncryptInner()
|