Home
last modified time | relevance | path

Searched refs:symKey (Results 1 - 16 of 16) sorted by relevance

/base/security/crypto_framework/frameworks/cj/src/
H A Dsym_key_generator_impl.cpp41 HcfResult SymKeyGeneratorImpl::GenerateSymKey(HcfSymKey **symKey) in GenerateSymKey() argument
47 HcfResult res = generator_->generateSymKey(generator_, symKey); in GenerateSymKey()
51 HcfResult SymKeyGeneratorImpl::ConvertKey(const HcfBlob key, HcfSymKey **symKey) in ConvertKey() argument
57 HcfResult res = generator_->convertSymKey(generator_, &key, symKey); in ConvertKey()
H A Dsym_key_impl.cpp19 SymKeyImpl::SymKeyImpl(HcfSymKey *symKey) : KeyImpl(reinterpret_cast<HcfKey *>(symKey)) {} in SymKeyImpl() argument
H A Dmac_impl.cpp30 HcfResult MacImpl::MacInit(HcfSymKey *symKey) in MacInit() argument
36 HcfResult res = macObj_->init(macObj_, symKey); in MacInit()
/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/
H A Dcipher_aes_openssl.c52 static const EVP_CIPHER *CipherEcbType(SymKeyImpl *symKey) in CipherEcbType() argument
54 if (symKey->keyMaterial.len == AES_SIZE_192) { in CipherEcbType()
56 } else if (symKey->keyMaterial.len == AES_SIZE_256) { in CipherEcbType()
63 static const EVP_CIPHER *CipherCbcType(SymKeyImpl *symKey) in CipherCbcType() argument
65 if (symKey->keyMaterial.len == AES_SIZE_192) { in CipherCbcType()
67 } else if (symKey->keyMaterial.len == AES_SIZE_256) { in CipherCbcType()
74 static const EVP_CIPHER *CipherCtrType(SymKeyImpl *symKey) in CipherCtrType() argument
76 if (symKey->keyMaterial.len == AES_SIZE_192) { in CipherCtrType()
78 } else if (symKey->keyMaterial.len == AES_SIZE_256) { in CipherCtrType()
85 static const EVP_CIPHER *CipherOfbType(SymKeyImpl *symKey) in CipherOfbType() argument
96 CipherCfbType(SymKeyImpl *symKey) CipherCfbType() argument
107 CipherCfb1Type(SymKeyImpl *symKey) CipherCfb1Type() argument
118 CipherCfb128Type(SymKeyImpl *symKey) CipherCfb128Type() argument
129 CipherCfb8Type(SymKeyImpl *symKey) CipherCfb8Type() argument
141 CipherCcmType(SymKeyImpl *symKey) CipherCcmType() argument
152 CipherGcmType(SymKeyImpl *symKey) CipherGcmType() argument
163 DefaultCiherType(SymKeyImpl *symKey) DefaultCiherType() argument
168 GetCipherType(HcfCipherAesGeneratorSpiOpensslImpl *impl, SymKeyImpl *symKey) GetCipherType() argument
[all...]
H A Dcipher_sm4_openssl.c47 static const EVP_CIPHER *CipherEcbType(SymKeyImpl *symKey) in CipherEcbType() argument
49 switch (symKey->keyMaterial.len) { in CipherEcbType()
58 static const EVP_CIPHER *CipherCbcType(SymKeyImpl *symKey) in CipherCbcType() argument
60 switch (symKey->keyMaterial.len) { in CipherCbcType()
69 static const EVP_CIPHER *CipherCtrType(SymKeyImpl *symKey) in CipherCtrType() argument
71 switch (symKey->keyMaterial.len) { in CipherCtrType()
80 static const EVP_CIPHER *CipherOfbType(SymKeyImpl *symKey) in CipherOfbType() argument
82 switch (symKey->keyMaterial.len) { in CipherOfbType()
91 static const EVP_CIPHER *CipherCfbType(SymKeyImpl *symKey) in CipherCfbType() argument
93 switch (symKey in CipherCfbType()
102 CipherCfb128Type(SymKeyImpl *symKey) CipherCfb128Type() argument
113 CipherGcmType(SymKeyImpl *symKey) CipherGcmType() argument
119 DefaultCipherType(SymKeyImpl *symKey) DefaultCipherType() argument
124 GetCipherType(HcfCipherSm4GeneratorSpiOpensslImpl *impl, SymKeyImpl *symKey) GetCipherType() argument
[all...]
/base/security/crypto_framework/test/unittest/src/native/
H A Dnative_sym_key_test.cpp68 OH_CryptoSymKey *symKey = nullptr; in HWTEST_F() local
72 ret = OH_CryptoSymKeyGenerator_Generate(ctx, &symKey); in HWTEST_F()
75 ret = OH_CryptoSymKey_GetKeyData(symKey, &dataBlob); in HWTEST_F()
81 OH_CryptoSymKey_Destroy(symKey); in HWTEST_F()
H A Dnative_sym_cipher_test.cpp168 OH_CryptoSymKey *symKey = nullptr; in HWTEST_F() local
171 ret = OH_CryptoSymKeyGenerator_Generate(ctx, &symKey); in HWTEST_F()
178 ret = AesEncrypt(cipher, symKey, params, cipherText, &cipherTextLen); in HWTEST_F()
185 ret = AesDecrypt(cipher, symKey, params, cipherText, cipherTextLen); in HWTEST_F()
190 OH_CryptoSymKey_Destroy(symKey); in HWTEST_F()
/base/security/crypto_framework/frameworks/cj/include/
H A Dsym_key_generator_impl.h32 HcfResult GenerateSymKey(HcfSymKey **symKey);
33 HcfResult ConvertKey(const HcfBlob key, HcfSymKey **symKey);
H A Dsym_key_impl.h29 explicit SymKeyImpl(HcfSymKey *symKey);
H A Dmac_impl.h32 HcfResult MacInit(HcfSymKey *symKey);
/base/security/crypto_framework/interfaces/inner_api/key/
H A Dsym_key_generator.h41 HcfResult (*generateSymKey)(HcfSymKeyGenerator *self, HcfSymKey **symKey);
44 HcfResult (*convertSymKey)(HcfSymKeyGenerator *self, const HcfBlob *key, HcfSymKey **symKey);
/base/security/crypto_framework/frameworks/js/napi/crypto/src/
H A Dnapi_sym_key.cpp27 NapiSymKey::NapiSymKey(HcfSymKey *symKey) : NapiKey(reinterpret_cast<HcfKey *>(symKey)) {} in NapiSymKey() argument
H A Dnapi_mac.cpp42 HcfSymKey *symKey = nullptr; member
72 context->symKey = nullptr; in FreeCryptoFwkCtx()
123 HcfSymKey *symKey = context->symKey; in MacInitExecute() local
124 context->errCode = macObj->init(macObj, symKey); in MacInitExecute()
220 NapiSymKey *symKey = nullptr; in BuildMacJsInitCtx() local
221 napi_status status = napi_unwrap(env, argv[PARAM0], reinterpret_cast<void **>(&symKey)); in BuildMacJsInitCtx()
222 if (status != napi_ok || symKey == nullptr) { in BuildMacJsInitCtx()
223 LOGE("symKey is null!"); in BuildMacJsInitCtx()
226 context->symKey in BuildMacJsInitCtx()
451 HcfSymKey *symKey = napiSysKey->GetSymKey(); JsMacInitSync() local
[all...]
/base/security/crypto_framework/frameworks/js/napi/crypto/inc/
H A Dnapi_sym_key.h30 explicit NapiSymKey(HcfSymKey *symKey);
/base/security/crypto_framework/frameworks/native/src/
H A Dsym_key.c30 HcfResult (*generateSymKey)(HcfSymKeyGenerator *self, HcfSymKey **symKey);
33 HcfResult (*convertSymKey)(HcfSymKeyGenerator *self, const HcfBlob *key, HcfSymKey **symKey);
/base/security/crypto_framework/plugin/openssl_plugin/key/sym_key_generator/src/
H A Dsym_key_openssl.c66 LOGE("symKey is NULL."); in ClearMem()
136 static HcfResult HcfSymmKeySpiCreate(int32_t keyLen, SymKeyImpl *symKey) in HcfSymmKeySpiCreate() argument
138 if ((keyLen == 0) || (symKey == NULL)) { in HcfSymmKeySpiCreate()
142 HcfResult res = RandomSymmKey(keyLen, &symKey->keyMaterial); in HcfSymmKeySpiCreate()

Completed in 6 milliseconds