Home
last modified time | relevance | path

Searched refs:cipherText (Results 1 – 25 of 101) sorted by relevance

12345

/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/src/
Dhks_mbedtls_aes.c99 const struct HksBlob *message, const bool encrypt, struct HksBlob *cipherText) in AesCbcNoPaddingCrypt() argument
129 cipherText->data); in AesCbcNoPaddingCrypt()
132 (void)memset_s(cipherText->data, cipherText->size, 0, cipherText->size); in AesCbcNoPaddingCrypt()
136 cipherText->size = message->size; in AesCbcNoPaddingCrypt()
183 const struct HksBlob *message, const bool encrypt, struct HksBlob *cipherText) in AesCbcNoPaddingCryptUpdate() argument
213 cipherText->data); in AesCbcNoPaddingCryptUpdate()
216 (void)memset_s(cipherText->data, cipherText->size, 0, cipherText->size); in AesCbcNoPaddingCryptUpdate()
221 cipherText->size = message->size; in AesCbcNoPaddingCryptUpdate()
229 const struct HksBlob *message, const bool encrypt, struct HksBlob *cipherText) in AesCbcNoPaddingCryptFinal() argument
260 cipherText->data); in AesCbcNoPaddingCryptFinal()
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/symmetric_alg_test/
Dhks_aes_cipher_test_common.cpp29 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) in HksAesCipherTestEncrypt() argument
39 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksAesCipherTestEncrypt()
44 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksAesCipherTestEncrypt()
53 …EXPECT_EQ(HksMemCmp(outData.data, cipherText->data, outData.size), HKS_SUCCESS) << "cipherText not… in HksAesCipherTestEncrypt()
59 struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText, in HksAesCipherTestEncryptWithoutNonce() argument
88 ret = TestUpdateLoopFinish(&handleEncrypt, encryptParamSet, inData, cipherText); in HksAesCipherTestEncryptWithoutNonce()
93 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksAesCipherTestEncryptWithoutNonce()
99 …const struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plain… in HksAesCipherTestDecrypt() argument
110 ret = TestUpdateLoopFinish(&handleDecrypt, decryptParamSet, cipherText, plainText); in HksAesCipherTestDecrypt()
119 ret = HksDecrypt(keyAlias, decryptParamSet, cipherText, &outData); in HksAesCipherTestDecrypt()
[all …]
/base/security/crypto_framework/test/unittest/src/
Dcrypto_sm4_cfb_cipher_test.cpp48 uint8_t cipherText[128] = {0}; variable
74 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
80 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
96 uint8_t cipherText[128] = {0}; variable
122 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
128 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
144 uint8_t cipherText[128] = {0}; variable
170 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
176 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
192 uint8_t cipherText[128] = {0}; variable
[all …]
Dcrypto_3des_cipher_test.cpp74 uint8_t *cipherText, int *cipherTextLen) in DesEncrypt() argument
93 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in DesEncrypt()
106 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in DesEncrypt()
117 uint8_t *cipherText, int cipherTextLen) in DesDecrypt() argument
120 HcfBlob input = {.data = (uint8_t *)cipherText, .len = cipherTextLen}; in DesDecrypt()
136 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in DesDecrypt()
149 …if (memcpy_s(cipherText + cipherTextLen, maxLen - cipherTextLen, output.data, output.len) != EOK) { in DesDecrypt()
160 return memcmp(cipherText, plainText, cipherTextLen); in DesDecrypt()
164 uint8_t *cipherText, int *cipherTextLen) in DesNoUpdateEncrypt() argument
183 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in DesNoUpdateEncrypt()
[all …]
Dsm4_common.cpp73 uint8_t *cipherText, int *cipherTextLen) in Sm4EncryptWithInput() argument
90 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in Sm4EncryptWithInput()
103 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in Sm4EncryptWithInput()
116 uint8_t *cipherText, int cipherTextLen) in Sm4DecryptEmptyMsg() argument
118 HcfBlob input = { .data = cipherText, .len = cipherTextLen }; in Sm4DecryptEmptyMsg()
142 uint8_t *cipherText, int *cipherTextLen) in Sm4Encrypt() argument
161 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in Sm4Encrypt()
174 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in Sm4Encrypt()
185 uint8_t *cipherText, int cipherTextLen) in Sm4Decrypt() argument
188 HcfBlob input = {.data = reinterpret_cast<uint8_t *>(cipherText), .len = cipherTextLen}; in Sm4Decrypt()
[all …]
Dcrypto_sm4_cipher_test.cpp53 uint8_t cipherText[128] = {0}; variable
79 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
85 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
101 uint8_t cipherText[128] = {0}; variable
127 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
132 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
148 uint8_t cipherText[128] = {0}; variable
172 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
178 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
194 uint8_t cipherText[128] = {0}; variable
[all …]
Dcrypto_sm4_ecb_cipher_test.cpp48 uint8_t cipherText[128] = {0}; variable
73 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
79 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
95 uint8_t cipherText[128] = {0}; variable
120 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
126 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
143 uint8_t cipherText[128] = {0}; variable
168 ret = Sm4Encrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
174 ret = Sm4Decrypt(cipher, key, nullptr, cipherText, cipherTextLen);
190 uint8_t cipherText[128] = {0}; variable
[all …]
/base/security/crypto_framework/test/unittest/src/aes_cipher/
Dcrypto_aes_cfb_cipher_test.cpp49 uint8_t cipherText[128] = {0}; variable
77 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
83 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
100 uint8_t cipherText[128] = {0}; variable
128 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
134 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
151 uint8_t cipherText[128] = {0}; variable
179 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
185 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
203 uint8_t cipherText[128] = {0}; variable
[all …]
Dcrypto_aes_ccm_cipher_test.cpp51 uint8_t cipherText[128] = {0}; variable
76 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, &cipherTextLen);
82 (void)memcpy_s(spec.tag.data, 12, cipherText + cipherTextLen - 12, 12);
86 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, cipherTextLen);
104 uint8_t cipherText[128] = {0}; variable
129 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, &cipherTextLen);
135 (void)memcpy_s(spec.tag.data, 12, cipherText + cipherTextLen - 12, 12);
139 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, cipherTextLen);
157 uint8_t cipherText[128] = {0}; variable
182 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, &cipherTextLen);
[all …]
Dcrypto_aes_gcm_cipher_test.cpp51 uint8_t cipherText[128] = {0}; variable
77 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, &cipherTextLen);
83 (void)memcpy_s(spec.tag.data, 16, cipherText + cipherTextLen - 16, 16);
87 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, cipherTextLen);
105 uint8_t cipherText[128] = {0}; variable
131 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, &cipherTextLen);
137 (void)memcpy_s(spec.tag.data, 16, cipherText + cipherTextLen - 16, 16);
141 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, cipherTextLen);
159 uint8_t cipherText[128] = {0}; variable
185 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&spec, cipherText, &cipherTextLen);
[all …]
Dcrypto_aes_ecb_cipher_test.cpp54 uint8_t cipherText[128] = {0}; variable
79 ret = AesEncrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
85 ret = AesDecrypt(cipher, key, nullptr, cipherText, cipherTextLen);
106 uint8_t cipherText[128] = {0}; variable
130 ret = AesEncrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
136 ret = AesDecrypt(cipher, key, nullptr, cipherText, cipherTextLen);
151 uint8_t cipherText[128] = {0}; variable
175 ret = AesEncrypt(cipher, key, nullptr, cipherText, &cipherTextLen);
181 ret = AesDecrypt(cipher, key, nullptr, cipherText, cipherTextLen);
197 uint8_t cipherText[128] = {0}; variable
[all …]
Dcrypto_aes_ofb_cipher_test.cpp49 uint8_t cipherText[128] = {0}; variable
77 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
83 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
100 uint8_t cipherText[128] = {0}; variable
128 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
134 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
151 uint8_t cipherText[128] = {0}; variable
179 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
185 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
201 uint8_t cipherText[128] = {0}; variable
[all …]
Dcrypto_aes_cbc_cipher_test.cpp49 uint8_t cipherText[128] = {0}; variable
77 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
83 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
100 uint8_t cipherText[128] = {0}; variable
128 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
134 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
151 uint8_t cipherText[128] = {0}; variable
179 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
185 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
202 uint8_t cipherText[128] = {0}; variable
[all …]
Dcrypto_aes_ctr_cipher_test.cpp49 uint8_t cipherText[128] = {0}; variable
77 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
83 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
100 uint8_t cipherText[128] = {0}; variable
128 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
134 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
151 uint8_t cipherText[128] = {0}; variable
179 ret = AesEncrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, &cipherTextLen);
185 ret = AesDecrypt(cipher, key, (HcfParamsSpec *)&ivSpec, cipherText, cipherTextLen);
202 uint8_t cipherText[128] = {0}; variable
[all …]
Daes_common.cpp258 uint8_t *cipherText, int *cipherTextLen) in AesEncryptWithInput() argument
275 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in AesEncryptWithInput()
288 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in AesEncryptWithInput()
296 PrintfHex("ciphertext", cipherText, *cipherTextLen); in AesEncryptWithInput()
301 uint8_t *cipherText, int *cipherTextLen) in AesEncrypt() argument
320 if (memcpy_s(cipherText, maxLen, output.data, output.len) != EOK) { in AesEncrypt()
333 …if (memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len) != EOK… in AesEncrypt()
341 PrintfHex("ciphertext", cipherText, *cipherTextLen); in AesEncrypt()
346 uint8_t *cipherText, int cipherTextLen) in AesDecrypt() argument
349 HcfBlob input = {.data = reinterpret_cast<uint8_t *>(cipherText), .len = cipherTextLen}; in AesDecrypt()
[all …]
/base/security/crypto_framework/test/unittest/include/
Dsm4_common.h37 uint8_t *cipherText, int *cipherTextLen);
41 uint8_t *cipherText, int cipherTextLen);
43 uint8_t *cipherText, int *cipherTextLen);
45 uint8_t *cipherText, int cipherTextLen);
47 uint8_t *cipherText, int *cipherTextLen);
49 uint8_t *cipherText, int cipherTextLen);
Daes_common.h59 uint8_t *cipherText, int *cipherTextLen);
61 uint8_t *cipherText, int *cipherTextLen);
63 uint8_t *cipherText, int cipherTextLen);
65 uint8_t *cipherText, int *cipherTextLen);
69 uint8_t *cipherText, int cipherTextLen);
71 uint8_t *cipherText, int *cipherTextLen);
73 uint8_t *cipherText, int cipherTextLen);
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/asymmetric_alg_test/
Dhks_rsa_cipher_test_common.cpp21 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) in HksRsaCipherTestEncryptAbnormal() argument
31 …t = TestUpdateFinish(&handleEncrypt, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherText); in HksRsaCipherTestEncryptAbnormal()
38 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksRsaCipherTestEncryptAbnormal()
47 …EXPECT_EQ(HksMemCmp(outData.data, cipherText->data, outData.size), HKS_SUCCESS) << "cipherText not… in HksRsaCipherTestEncryptAbnormal()
53 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) in HksRsaCipherTestEncrypt() argument
63 …t = TestUpdateFinish(&handleEncrypt, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherText); in HksRsaCipherTestEncrypt()
68 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksRsaCipherTestEncrypt()
82 …const struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plain… in HksRsaCipherTestDecrypt() argument
93 …ret = TestUpdateFinish(&handleDecrypt, decryptParamSet, HKS_KEY_PURPOSE_DECRYPT, cipherText, plain… in HksRsaCipherTestDecrypt()
102 ret = HksDecrypt(keyAlias, decryptParamSet, cipherText, &outData); in HksRsaCipherTestDecrypt()
[all …]
Dhks_sm2_cipher_test.cpp359 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) in HksSm2CipherTestEncrypt() argument
369 …t = TestUpdateFinish(&handleEncrypt, encryptParamSet, HKS_KEY_PURPOSE_ENCRYPT, inData, cipherText); in HksSm2CipherTestEncrypt()
373 …EXPECT_NE(HksMemCmp(inData->data, cipherText->data, inData->size), HKS_SUCCESS) << "cipherText equ… in HksSm2CipherTestEncrypt()
387 const struct HksBlob *cipherText, struct HksBlob *plainText, const struct HksBlob *inData) in HksSm2CipherTestDecrypt() argument
396 …ret = TestUpdateFinish(&handleDecrypt, decryptParamSet, HKS_KEY_PURPOSE_DECRYPT, cipherText, plain… in HksSm2CipherTestDecrypt()
404 ret = HksDecrypt(keyAlias, decryptParamSet, cipherText, &outData); in HksSm2CipherTestDecrypt()
424 const struct HksBlob *inData, struct HksBlob *cipherText) in HksSm2CipherTestRun() argument
456 ret = HksSm2CipherTestEncrypt(&newKeyAlias, encryptParamSet, inData, cipherText); in HksSm2CipherTestRun()
467 ret = HksSm2CipherTestDecrypt(keyAlias, decryptParamSet, cipherText, &plainText, inData); in HksSm2CipherTestRun()
490 struct HksBlob cipherText = { SM2_COMMON_SIZE, cipher }; variable
[all …]
/base/security/huks/test/unittest/huks_standard_test/three_stage_test/src/
Dhks_sm4_cipher_test_common.cpp24 …onst struct HksParamSet *encryptParamSet, const struct HksBlob *inData, struct HksBlob *cipherText) 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()
45 …const struct HksParamSet *decryptParamSet, const struct HksBlob *cipherText, struct HksBlob *plain… in HksSm4CipherTestDecrypt() argument
56 ret = TestUpdateLoopFinish(&handleDecrypt, decryptParamSet, cipherText, plainText); in HksSm4CipherTestDecrypt()
90 struct HksBlob cipherText = { SM4_COMMON_SIZE, cipher }; in HksSm4CipherTestCaseOther() local
91 ret = HksSm4CipherTestEncrypt(keyAlias, encryptParamSet, &inData, &cipherText); in HksSm4CipherTestCaseOther()
97 ret = HksSm4CipherTestDecrypt(keyAlias, decryptParamSet, &cipherText, &plainText, &inData); in HksSm4CipherTestCaseOther()
/base/security/huks/frameworks/huks_standard/main/crypto_engine/mbedtls/include/
Dhks_mbedtls_aes.h38 const struct HksBlob *message, struct HksBlob *cipherText, struct HksBlob *tagAead);
41 const struct HksBlob *message, struct HksBlob *cipherText);
46 …sMbedtlsAesCryptoUpdate(void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
49 …sMbedtlsAesCryptoFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
/base/security/huks/frameworks/huks_standard/main/crypto_engine/openssl/include/
Dhks_openssl_aes.h40 …pensslAesEncryptUpdate(void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText);
42 …OpensslAesEncryptFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
49 …OpensslAesDecryptFinal(void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText,
55 const struct HksBlob *message, struct HksBlob *cipherText, struct HksBlob *tagAead);
91 void *cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText);
94 void **cryptoCtx, const struct HksBlob *message, struct HksBlob *cipherText);
/base/security/huks/test/unittest/huks_standard_test/crypto_engine_test/src/
Dhks_crypto_hal_api_openssl.cpp151 HksBlob cipherText = { .size = 0, .data = nullptr }; variable
155 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
159 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
163 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
166 cipherText = { .size = 1, .data = buff };
167 ret = HksCryptoHalEncrypt(&key, nullptr, &message, &cipherText, &tagAead);
170 ret = HksCryptoHalEncrypt(&key, &spec, &message, &cipherText, &tagAead);
186 HksBlob cipherText = { .size = 0, .data = nullptr }; variable
189 ret = HksCryptoHalDecrypt(&key, nullptr, &message, &cipherText);
193 ret = HksCryptoHalDecrypt(&key, nullptr, &message, &cipherText);
[all …]
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/
Dhcfciphercreate_fuzzer.cpp34 uint8_t *cipherText, int *cipherTextLen) in AesEncrypt() argument
51 (void)memcpy_s(cipherText, maxLen, output.data, output.len); in AesEncrypt()
62 … (void)memcpy_s(cipherText + *cipherTextLen, maxLen - *cipherTextLen, output.data, output.len); in AesEncrypt()
73 uint8_t *cipherText, int cipherTextLen) in AesDecrypt() argument
76 HcfBlob input = {.data = cipherText, .len = cipherTextLen}; in AesDecrypt()
89 (void)memcpy_s(cipherText, maxLen, output.data, output.len); in AesDecrypt()
102 … (void)memcpy_s(cipherText + cipherTextLen, maxLen - cipherTextLen, output.data, output.len); in AesDecrypt()
110 ret = memcmp(cipherText, plainText, cipherTextLen); in AesDecrypt()
118 uint8_t cipherText[128] = {0}; in TestAesCipher() local
139 (void)AesEncrypt(cipher, key, nullptr, cipherText, &cipherTextLen); in TestAesCipher()
[all …]
/base/security/dlp_permission_service/interfaces/inner_api/dlp_parse/test/
Ddlp_crypt_test.cpp113 struct DlpBlob cipherText = {15, enc}; variable
116 int32_t ret = DlpOpensslAesEncrypt(nullptr, &usageSpec, &message, &cipherText);
134 struct DlpBlob cipherText = {15, enc}; variable
137 int32_t ret = DlpOpensslAesEncrypt(&key, nullptr, &message, &cipherText);
155 struct DlpBlob cipherText = {15, enc}; variable
158 int32_t ret = DlpOpensslAesEncrypt(&key, &usageSpec, nullptr, &cipherText);
382 struct DlpBlob cipherText = {32, g_key}; variable
385 int32_t ret = DlpOpensslAesEncryptUpdate(nullptr, &message, &cipherText);
403 struct DlpBlob cipherText = {15, enc}; variable
410 ret = DlpOpensslAesEncryptUpdate(ctx, nullptr, &cipherText);
[all …]

12345