/base/security/crypto_framework/interfaces/inner_api/crypto_operation/ |
H A D | cipher.h | 47 typedef struct HcfCipher HcfCipher; typedef 55 struct HcfCipher { struct 58 HcfResult (*init)(HcfCipher *self, enum HcfCryptoMode opMode, 61 HcfResult (*update)(HcfCipher *self, HcfBlob *input, HcfBlob *output); 63 HcfResult (*doFinal)(HcfCipher *self, HcfBlob *input, HcfBlob *output); 65 const char *(*getAlgorithm)(HcfCipher *self); 67 HcfResult (*setCipherSpecUint8Array)(HcfCipher *self, CipherSpecItem item, HcfBlob blob); 69 HcfResult (*getCipherSpecString)(HcfCipher *self, CipherSpecItem item, char **returnString); 71 HcfResult (*getCipherSpecUint8Array)(HcfCipher *sel [all...] |
/base/security/crypto_framework/test/unittest/include/ |
H A D | sm4_common.h | 32 int32_t Sm4EncryptWithInput(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, 36 int32_t Sm4DecryptEmptyMsg(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, 38 int32_t Sm4Encrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, 40 int32_t Sm4Decrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, 42 int32_t Sm4NoUpdateEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, 44 int32_t Sm4NoUpdateDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params,
|
H A D | aes_common.h | 54 int32_t AesMultiBlockEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params); 55 int32_t AesMultiBlockDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params); 58 int32_t AesEncryptWithInput(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, 60 int32_t AesEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, 62 int32_t AesDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, 64 int32_t AesNoUpdateEncWithInput(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, 68 int32_t AesDecryptEmptyMsg(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, 70 int32_t AesNoUpdateEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, 72 int32_t AesNoUpdateDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params,
|
/base/security/crypto_framework/frameworks/native/src/ |
H A D | sym_cipher.c | 30 HcfResult (*init)(HcfCipher *self, enum HcfCryptoMode opMode, 33 HcfResult (*update)(HcfCipher *self, HcfBlob *input, HcfBlob *output); 35 HcfResult (*doFinal)(HcfCipher *self, HcfBlob *input, HcfBlob *output); 37 const char *(*getAlgorithm)(HcfCipher *self); 39 HcfResult (*setCipherSpecUint8Array)(HcfCipher *self, CipherSpecItem item, HcfBlob blob); 41 HcfResult (*getCipherSpecString)(HcfCipher *self, CipherSpecItem item, char **returnString); 43 HcfResult (*getCipherSpecUint8Array)(HcfCipher *self, CipherSpecItem item, HcfBlob *returnUint8Array); 109 HcfResult ret = HcfCipherCreate(algoName, (HcfCipher **)ctx); in OH_CryptoSymCipher_Create() 119 HcfResult ret = ctx->init((HcfCipher *)ctx, (enum HcfCryptoMode)mod, (HcfKey *)key, (HcfParamsSpec *)params); in OH_CryptoSymCipher_Init() 128 HcfResult ret = ctx->update((HcfCipher *)ct in OH_CryptoSymCipher_Update() [all...] |
/base/security/crypto_framework/test/unittest/src/ |
H A D | crypto_sm4_ecb_cipher_test.cpp | 53 HcfCipher *cipher = nullptr; in HWTEST_F() 100 HcfCipher *cipher = nullptr; in HWTEST_F() 148 HcfCipher *cipher = nullptr; in HWTEST_F() 195 HcfCipher *cipher = nullptr; in HWTEST_F() 242 HcfCipher *cipher = nullptr; in HWTEST_F() 290 HcfCipher *cipher = nullptr; in HWTEST_F() 333 HcfCipher *cipher = nullptr; in HWTEST_F() 362 HcfCipher *cipher = nullptr; in HWTEST_F() 391 HcfCipher *cipher = nullptr; in HWTEST_F() 431 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_sm4_cfb_cipher_test.cpp | 53 HcfCipher *cipher = nullptr; in HWTEST_F() 101 HcfCipher *cipher = nullptr; in HWTEST_F() 149 HcfCipher *cipher = nullptr; in HWTEST_F() 197 HcfCipher *cipher = nullptr; in HWTEST_F() 245 HcfCipher *cipher = nullptr; in HWTEST_F() 293 HcfCipher *cipher = nullptr; in HWTEST_F() 341 HcfCipher *cipher = nullptr; in HWTEST_F() 388 HcfCipher *cipher = nullptr; in HWTEST_F() 436 HcfCipher *cipher = nullptr; in HWTEST_F() 484 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_rsa_cipher_test.cpp | 149 static HcfResult RsaCipherSpec(HcfCipher *cipher) in RsaCipherSpec() 182 static HcfResult RsaSpecpSource(HcfCipher *cipher, uint8_t *pSourceData, HcfBlob pSource) in RsaSpecpSource() 214 HcfCipher *cipher = nullptr; in HWTEST_F() 232 HcfCipher *cipher = nullptr; in HWTEST_F() 247 HcfCipher *cipher = nullptr; in HWTEST_F() 262 HcfCipher *cipher = nullptr; in HWTEST_F() 277 HcfCipher *cipher = nullptr; in HWTEST_F() 292 HcfCipher *cipher = nullptr; in HWTEST_F() 307 HcfCipher *cipher = nullptr; in HWTEST_F() 322 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_sm4_gcm_cipher_test.cpp | 56 HcfCipher *cipher = nullptr; in HWTEST_F() 110 HcfCipher *cipher = nullptr; in HWTEST_F() 164 HcfCipher *cipher = nullptr; in HWTEST_F() 218 HcfCipher *cipher = nullptr; in HWTEST_F() 272 HcfCipher *cipher = nullptr; in HWTEST_F() 326 HcfCipher *cipher = nullptr; in HWTEST_F() 374 HcfCipher *cipher = nullptr; in HWTEST_F() 388 HcfCipher *cipher = nullptr; in HWTEST_F() 405 HcfCipher *cipher = nullptr; in HWTEST_F() 448 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_3des_cipher_test.cpp | 73 static int32_t DesEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in DesEncrypt() 116 static int32_t DesDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in DesDecrypt() 163 static int32_t DesNoUpdateEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in DesNoUpdateEncrypt() 193 static int32_t DesNoUpdateDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in DesNoUpdateDecrypt() 234 HcfCipher *cipher = nullptr; in HWTEST_F() 281 HcfCipher *cipher = nullptr; in HWTEST_F() 329 HcfCipher *cipher = nullptr; in HWTEST_F() 377 HcfCipher *cipher = nullptr; in HWTEST_F() 428 HcfCipher *cipher = nullptr; in HWTEST_F() 478 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_sm4_cipher_test.cpp | 53 HcfCipher *cipher = nullptr; in HWTEST_F() 101 HcfCipher *cipher = nullptr; in HWTEST_F() 148 HcfCipher *cipher = nullptr; in HWTEST_F() 194 HcfCipher *cipher = nullptr; in HWTEST_F() 243 HcfCipher *cipher = nullptr; in HWTEST_F() 289 HcfCipher *cipher = nullptr; in HWTEST_F() 337 HcfCipher *cipher = nullptr; in HWTEST_F() 385 HcfCipher *cipher = nullptr; in HWTEST_F() 432 HcfCipher *cipher = nullptr; in HWTEST_F() 479 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | sm4_common.cpp | 73 int32_t Sm4EncryptWithInput(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, in Sm4EncryptWithInput() 116 int32_t Sm4DecryptEmptyMsg(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in Sm4DecryptEmptyMsg() 142 int32_t Sm4Encrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in Sm4Encrypt() 185 int32_t Sm4Decrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in Sm4Decrypt() 232 int32_t Sm4NoUpdateEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in Sm4NoUpdateEncrypt() 262 int32_t Sm4NoUpdateDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in Sm4NoUpdateDecrypt()
|
H A D | crypto_sm2_cipher_test.cpp | 80 HcfCipher *cipher = nullptr; in HWTEST_F() 104 HcfCipher *cipher = nullptr; in HWTEST_F() 113 HcfCipher *cipher = nullptr; in HWTEST_F() 123 HcfCipher *cipher = nullptr; in HWTEST_F() 132 HcfCipher *cipher = nullptr; in HWTEST_F() 148 HcfCipher *cipher = nullptr; in HWTEST_F() 169 HcfCipher *cipher = nullptr; in HWTEST_F() 190 HcfCipher *cipher = nullptr; in HWTEST_F() 212 HcfCipher *cipher = nullptr; in HWTEST_F() 233 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_rsa_cipher_sub_test.cpp | 175 HcfCipher *cipher = nullptr; in HWTEST_F() 184 res = cipher->setCipherSpecUint8Array(reinterpret_cast<HcfCipher *>(&g_obj), in HWTEST_F() 214 HcfCipher *cipher = nullptr; in HWTEST_F() 218 res = cipher->getCipherSpecString(reinterpret_cast<HcfCipher *>(&g_obj), OAEP_MD_NAME_STR, &ret); in HWTEST_F() 244 HcfCipher *cipher = nullptr; in HWTEST_F() 248 res = cipher->getCipherSpecUint8Array(reinterpret_cast<HcfCipher *>(&g_obj), OAEP_MGF1_PSRC_UINT8ARR, &retBlob); in HWTEST_F() 274 HcfCipher *cipher = nullptr; in HWTEST_F() 304 HcfCipher *cipher = nullptr; in HWTEST_F() 333 HcfCipher *cipher = nullptr; in HWTEST_F() 362 HcfCipher *ciphe in HWTEST_F() [all...] |
/base/security/crypto_framework/frameworks/js/napi/crypto/inc/ |
H A D | napi_cipher.h | 29 explicit NapiCipher(HcfCipher *cipher); 47 HcfCipher *GetCipher() const; 51 HcfCipher *cipher_;
|
/base/security/crypto_framework/frameworks/crypto_operation/ |
H A D | cipher.c | 32 HcfCipher super; 185 static const char *GetAlgorithm(HcfCipher *self) in GetAlgorithm() 213 static HcfResult SetCipherSpecUint8Array(HcfCipher *self, CipherSpecItem item, HcfBlob pSource) in SetCipherSpecUint8Array() 239 static HcfResult GetCipherSpecString(HcfCipher *self, CipherSpecItem item, char **returnString) in GetCipherSpecString() 257 static HcfResult GetCipherSpecUint8Array(HcfCipher *self, CipherSpecItem item, HcfBlob *returnUint8Array) in GetCipherSpecUint8Array() 275 static HcfResult CipherInit(HcfCipher *self, enum HcfCryptoMode opMode, in CipherInit() 290 static HcfResult CipherUpdate(HcfCipher *self, HcfBlob *input, HcfBlob *output) in CipherUpdate() 304 static HcfResult CipherFinal(HcfCipher *self, HcfBlob *input, HcfBlob *output) in CipherFinal() 345 HcfResult HcfCipherCreate(const char *transformation, HcfCipher **returnObj) in HcfCipherCreate() 382 *returnObj = (HcfCipher *)returnGenerato in HcfCipherCreate() [all...] |
/base/security/crypto_framework/test/unittest/src/aes_cipher/ |
H A D | crypto_aes_ecb_cipher_test.cpp | 58 HcfCipher *cipher = nullptr; in HWTEST_F() 110 HcfCipher *cipher = nullptr; in HWTEST_F() 155 HcfCipher *cipher = nullptr; in HWTEST_F() 200 HcfCipher *cipher = nullptr; in HWTEST_F() 250 HcfCipher *cipher = nullptr; in HWTEST_F() 296 HcfCipher *cipher = nullptr; in HWTEST_F() 341 HcfCipher *cipher = nullptr; in HWTEST_F() 386 HcfCipher *cipher = nullptr; in HWTEST_F() 432 HcfCipher *cipher = nullptr; in HWTEST_F() 480 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_aes_cfb_cipher_test.cpp | 54 HcfCipher *cipher = nullptr; in HWTEST_F() 105 HcfCipher *cipher = nullptr; in HWTEST_F() 156 HcfCipher *cipher = nullptr; in HWTEST_F() 208 HcfCipher *cipher = nullptr; in HWTEST_F() 259 HcfCipher *cipher = nullptr; in HWTEST_F() 310 HcfCipher *cipher = nullptr; in HWTEST_F() 360 HcfCipher *cipher = nullptr; in HWTEST_F() 410 HcfCipher *cipher = nullptr; in HWTEST_F() 460 HcfCipher *cipher = nullptr; in HWTEST_F() 510 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_aes_ccm_cipher_test.cpp | 54 HcfCipher *cipher = nullptr; in HWTEST_F() 107 HcfCipher *cipher = nullptr; in HWTEST_F() 160 HcfCipher *cipher = nullptr; in HWTEST_F() 213 HcfCipher *cipher = nullptr; in HWTEST_F() 266 HcfCipher *cipher = nullptr; in HWTEST_F() 320 HcfCipher *cipher = nullptr; in HWTEST_F() 373 HcfCipher *cipher = nullptr; in HWTEST_F() 425 HcfCipher *cipher = nullptr; in HWTEST_F() 474 HcfCipher *cipher = nullptr; in HWTEST_F() 509 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | crypto_aes_ctr_cipher_test.cpp | 54 HcfCipher *cipher = nullptr; in HWTEST_F() 105 HcfCipher *cipher = nullptr; in HWTEST_F() 156 HcfCipher *cipher = nullptr; in HWTEST_F() 207 HcfCipher *cipher = nullptr; in HWTEST_F() 258 HcfCipher *cipher = nullptr; in HWTEST_F() 309 HcfCipher *cipher = nullptr; in HWTEST_F() 357 HcfCipher *cipher = nullptr; in HWTEST_F() 410 HcfCipher *cipher = nullptr; in HWTEST_F() 452 HcfCipher *cipher = nullptr; in HWTEST_F()
|
H A D | crypto_aes_cbc_cipher_test.cpp | 54 HcfCipher *cipher = nullptr; in HWTEST_F() 105 HcfCipher *cipher = nullptr; in HWTEST_F() 156 HcfCipher *cipher = nullptr; in HWTEST_F() 207 HcfCipher *cipher = nullptr; in HWTEST_F() 258 HcfCipher *cipher = nullptr; in HWTEST_F() 309 HcfCipher *cipher = nullptr; in HWTEST_F() 359 HcfCipher *cipher = nullptr; in HWTEST_F() 411 HcfCipher *cipher = nullptr; in HWTEST_F() 453 HcfCipher *cipher = nullptr; in HWTEST_F()
|
H A D | crypto_aes_ofb_cipher_test.cpp | 54 HcfCipher *cipher = nullptr; in HWTEST_F() 105 HcfCipher *cipher = nullptr; in HWTEST_F() 156 HcfCipher *cipher = nullptr; in HWTEST_F() 206 HcfCipher *cipher = nullptr; in HWTEST_F() 257 HcfCipher *cipher = nullptr; in HWTEST_F() 308 HcfCipher *cipher = nullptr; in HWTEST_F() 355 HcfCipher *cipher = nullptr; in HWTEST_F() 408 HcfCipher *cipher = nullptr; in HWTEST_F() 450 HcfCipher *cipher = nullptr; in HWTEST_F()
|
H A D | crypto_aes_gcm_cipher_test.cpp | 54 HcfCipher *cipher = nullptr; in HWTEST_F() 108 HcfCipher *cipher = nullptr; in HWTEST_F() 162 HcfCipher *cipher = nullptr; in HWTEST_F() 216 HcfCipher *cipher = nullptr; in HWTEST_F() 270 HcfCipher *cipher = nullptr; in HWTEST_F() 324 HcfCipher *cipher = nullptr; in HWTEST_F() 378 HcfCipher *cipher = nullptr; in HWTEST_F() 431 HcfCipher *cipher = nullptr; in HWTEST_F() 478 HcfCipher *cipher = nullptr; in HWTEST_F() 492 HcfCipher *ciphe in HWTEST_F() [all...] |
H A D | aes_common.cpp | 148 int32_t AesMultiBlockEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params) in AesMultiBlockEncrypt() 202 int32_t AesMultiBlockDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params) in AesMultiBlockDecrypt() 257 int32_t AesEncryptWithInput(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, in AesEncryptWithInput() 300 int32_t AesEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in AesEncrypt() 345 int32_t AesDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in AesDecrypt() 393 int32_t AesNoUpdateEncWithInput(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, in AesNoUpdateEncWithInput() 424 int32_t AesDecryptEmptyMsg(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in AesDecryptEmptyMsg() 449 int32_t AesNoUpdateEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in AesNoUpdateEncrypt() 481 int32_t AesNoUpdateDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfParamsSpec *params, in AesNoUpdateDecrypt()
|
/base/security/crypto_framework/frameworks/cj/include/ |
H A D | cipher_impl.h | 29 explicit CipherImpl(HcfCipher *cipher); 40 HcfCipher *cipher_;
|
/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/ |
H A D | hcfciphercreate_fuzzer.cpp | 32 static int32_t AesEncrypt(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, in AesEncrypt() 69 static int32_t AesDecrypt(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, in AesDecrypt() 113 static int32_t Sm4Encrypt(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, in Sm4Encrypt() 151 static int32_t Sm4Decrypt(HcfCipher *cipher, HcfSymKey *key, HcfBlob *input, in Sm4Decrypt() 203 HcfCipher *cipher = nullptr; in TestAesCipher() 235 HcfCipher *cipher = nullptr; in TestSm4Cipher() 278 HcfCipher *cipher = nullptr; in TestSm4GcmCipher() 320 HcfCipher *cipher = nullptr; in TestRsaCipher() 355 HcfCipher *cipher = nullptr; in HcfCipherCreateFuzzTest()
|