/ohos5.0/base/security/crypto_framework/test/unittest/src/ |
H A D | crypto_rsa_asy_key_pem_test.cpp | 812 res = pubkey->base.getEncodedPem((HcfKey *)pubkey, "X509", &retStr); in RsaAsyKeyPemTest3() 840 res = pubkey->base.getEncodedPem((HcfKey *)pubkey, "X509", &retStr); in RsaAsyKeyPemTest4() 869 res = pubkey->base.getEncodedPem((HcfKey *)pubkey, "X509", &retStr); in RsaAsyKeyPemTest5() 910 res = pubkey->base.getEncodedPem((HcfKey *)pubkey, "X509", &retStr); in RsaAsyKeyPemTest6() 951 res = pubkey->base.getEncodedPem((HcfKey *)pubkey, "X509", &retStr); in RsaAsyKeyPemTest7() 992 res = pubkey->base.getEncodedPem((HcfKey *)pubkey, "X509", &retStr); in RsaAsyKeyPemTest8() 1247 res = pubkey->base.getEncodedPem((HcfKey *)pubkey, "test", &retStr); 1255 res = pubkey->base.getEncodedPem((HcfKey *)pubkey, "x509", &retStr); 1259 res = prikey->base.getEncodedPem((HcfKey *)prikey, "X509", &retStr); 1263 res = prikey->base.getEncodedPem((HcfKey *)prikey, "test", &retStr); [all …]
|
H A D | crypto_rsa_asy_key_generator_test.cpp | 407 EXPECT_NE(pubkey->base.getFormat((HcfKey *)pubkey), nullptr); 413 EXPECT_NE(prikey->base.getFormat((HcfKey *)prikey), nullptr); 439 EXPECT_NE(pubkey->base.getFormat((HcfKey *)pubkey), nullptr); 445 EXPECT_NE(prikey->base.getFormat((HcfKey *)prikey), nullptr); 467 res = pubKey->base.getEncoded((HcfKey *)priKey, &pubKeyBlob); 469 res = priKey->base.getEncoded((HcfKey *)pubKey, &priKeyBlob); 488 res = pubKey->base.getEncoded((HcfKey *)priKey, nullptr); 490 res = priKey->base.getEncoded((HcfKey *)pubKey, nullptr); 519 EXPECT_NE(pubkey->base.getFormat((HcfKey *)pubkey), nullptr); 525 EXPECT_NE(prikey->base.getFormat((HcfKey *)prikey), nullptr); [all …]
|
H A D | crypto_sm2_cipher_test.cpp | 151 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 193 res = cipher->init(cipher, DECRYPT_MODE, (HcfKey *)keyPair->priKey, nullptr); 215 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->priKey, nullptr); 236 res = cipher->init(cipher, DECRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 257 res = cipher->init(nullptr, DECRYPT_MODE, (HcfKey *)keyPair->priKey, nullptr); 320 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 352 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 362 res = cipher->init(cipher, DECRYPT_MODE, (HcfKey *)keyPair->priKey, nullptr); 472 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 502 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); [all …]
|
H A D | crypto_rsa_cipher_test.cpp | 613 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 655 res = cipher->init(cipher, DECRYPT_MODE, (HcfKey *)keyPair->priKey, nullptr); 677 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->priKey, nullptr); 698 res = cipher->init(cipher, DECRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 782 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 814 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 824 res = cipher->init(cipher, DECRYPT_MODE, (HcfKey *)keyPair->priKey, nullptr); 858 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); 868 res = cipher->init(cipher, DECRYPT_MODE, (HcfKey *)keyPair->priKey, nullptr); 902 res = cipher->init(cipher, ENCRYPT_MODE, (HcfKey *)keyPair->pubKey, nullptr); [all …]
|
H A D | sm4_common.cpp | 149 int32_t ret = cipher->init(cipher, ENCRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in Sm4Encrypt() 192 int32_t ret = cipher->init(cipher, DECRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in Sm4Decrypt() 239 int32_t ret = cipher->init(cipher, ENCRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in Sm4NoUpdateEncrypt() 269 int32_t ret = cipher->init(cipher, DECRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in Sm4NoUpdateDecrypt()
|
H A D | crypto_dsa_exception_test.cpp | 218 GetDsaPriKeyAlgorithm((HcfKey *)&g_obj); 223 ret = GetDsaPriKeyEncoded((HcfKey *)&g_obj, nullptr); 227 ret = GetDsaPriKeyEncoded((HcfKey *)&g_obj, &blob); 230 (void)GetDsaPubKeyFormat((HcfKey *)&g_obj); 232 (void)GetDsaPriKeyFormat((HcfKey *)&g_obj);
|
/ohos5.0/base/security/crypto_framework/interfaces/innerkits/key/ |
H A D | key.h | 60 typedef struct HcfKey HcfKey; typedef 62 struct HcfKey { struct 65 const char *(*getAlgorithm)(HcfKey *self); argument 67 HcfResult (*getEncoded)(HcfKey *self, HcfBlob *returnBlob); argument 69 HcfResult (*getEncodedPem)(HcfKey *self, const char *format, char **returnString); argument 71 const char *(*getFormat)(HcfKey *self); argument
|
/ohos5.0/base/security/certificate_framework/frameworks/js/napi/certificate/src/ |
H A D | napi_key.cpp | 29 NapiKey::NapiKey(HcfKey *hcfKey) in NapiKey() 36 HcfKey *NapiKey::GetHcfKey() const in GetHcfKey() 48 HcfKey *key = napiKey->GetHcfKey(); in JsGetAlgorithm() 63 HcfKey *key = napiKey->GetHcfKey(); in JsGetFormat() 78 HcfKey *key = napiKey->GetHcfKey(); in JsGetEncoded()
|
/ohos5.0/base/security/crypto_framework/frameworks/cj/include/ |
H A D | key_impl.h | 28 explicit KeyImpl(HcfKey *hcfKey); 30 HcfKey *GetHcfKey() const; 36 HcfKey *hcfKey_;
|
/ohos5.0/base/security/certificate_framework/frameworks/js/napi/certificate/inc/ |
H A D | napi_key.h | 28 explicit NapiKey(HcfKey *hcfKey); 30 HcfKey *GetHcfKey() const; 41 HcfKey *hcfKey_;
|
/ohos5.0/base/security/crypto_framework/frameworks/js/napi/crypto/inc/ |
H A D | napi_key.h | 29 explicit NapiKey(HcfKey *hcfKey); 31 HcfKey *GetHcfKey() const; 42 HcfKey *hcfKey_;
|
/ohos5.0/base/security/crypto_framework/frameworks/js/napi/crypto/src/ |
H A D | napi_key.cpp | 27 NapiKey::NapiKey(HcfKey *hcfKey) in NapiKey() 34 HcfKey *NapiKey::GetHcfKey() const in GetHcfKey() 51 HcfKey *key = napiKey->GetHcfKey(); in JsGetAlgorithm() 76 HcfKey *key = napiKey->GetHcfKey(); in JsGetFormat() 101 HcfKey *key = napiKey->GetHcfKey(); in JsGetEncoded()
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/key/asy_key_generator/src/ |
H A D | sm2_asy_key_generator_openssl.c | 395 static const char *GetSm2PubKeyAlgorithm(HcfKey *self) in GetSm2PubKeyAlgorithm() 408 static const char *GetSm2PriKeyAlgorithm(HcfKey *self) in GetSm2PriKeyAlgorithm() 421 static const char *GetSm2PubKeyFormat(HcfKey *self) in GetSm2PubKeyFormat() 434 static const char *GetSm2PriKeyFormat(HcfKey *self) in GetSm2PriKeyFormat() 447 static HcfResult GetSm2PubKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetSm2PubKeyEncoded() 486 static HcfResult GetSm2PriKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetSm2PriKeyEncoded() 572 static HcfResult CheckSm2KeySelf(const HcfKey *self, bool *isPrivate) in CheckSm2KeySelf() 717 return GetSm2KeySpecString((HcfKey *)self, item, returnString); in GetSm2PubKeySpecString() 722 return GetSm2KeySpecString((HcfKey *)self, item, returnString); in GetSm2PriKeySpecString() 727 return GetSm2KeySpecInt((HcfKey *)self, item, returnInt); in GetSm2PubKeySpecInt() [all …]
|
H A D | dsa_asy_key_generator_openssl.c | 142 static const char *GetDsaPubKeyAlgorithm(HcfKey *self) in GetDsaPubKeyAlgorithm() 154 static const char *GetDsaPriKeyAlgorithm(HcfKey *self) in GetDsaPriKeyAlgorithm() 166 static HcfResult GetDsaPubKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetDsaPubKeyEncoded() 188 static HcfResult GetDsaPubKeyEncodedPem(HcfKey *self, const char *format, char **returnString) in GetDsaPubKeyEncodedPem() 196 static HcfResult GetDsaPriKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetDsaPriKeyEncoded() 218 static HcfResult GetDsaPriKeyEncodedPem(HcfKey *self, const char *format, char **returnString) in GetDsaPriKeyEncodedPem() 226 static const char *GetDsaPubKeyFormat(HcfKey *self) in GetDsaPubKeyFormat() 238 static const char *GetDsaPriKeyFormat(HcfKey *self) in GetDsaPriKeyFormat()
|
H A D | ecc_asy_key_generator_openssl.c | 931 static const char *GetEccPubKeyAlgorithm(HcfKey *self) in GetEccPubKeyAlgorithm() 943 static const char *GetEccPriKeyAlgorithm(HcfKey *self) in GetEccPriKeyAlgorithm() 955 static const char *GetEccPubKeyFormat(HcfKey *self) in GetEccPubKeyFormat() 967 static const char *GetEccPriKeyFormat(HcfKey *self) in GetEccPriKeyFormat() 1192 static HcfResult GetEccPubKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetEccPubKeyEncoded() 1226 static HcfResult GetEccPriKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetEccPriKeyEncoded() 1407 static HcfResult CheckEcKeySelf(const HcfKey *self, bool *isPrivate) in CheckEcKeySelf() 1538 return GetEcKeySpecString((HcfKey *)self, item, returnString); in GetECPubKeySpecString() 1543 return GetEcKeySpecInt((HcfKey *)self, item, returnInt); in GetECPubKeySpecInt() 1554 return GetEcKeySpecString((HcfKey *)self, item, returnString); in GetECPriKeySpecString() [all …]
|
H A D | alg_25519_asy_key_generator_openssl.c | 137 static const char *GetAlg25519PubKeyAlgorithm(HcfKey *self) in GetAlg25519PubKeyAlgorithm() 156 static const char *GetAlg25519PriKeyAlgorithm(HcfKey *self) in GetAlg25519PriKeyAlgorithm() 175 static HcfResult GetAlg25519PubKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetAlg25519PubKeyEncoded() 202 static HcfResult GetAlg25519PubKeyEncodedPem(HcfKey *self, const char *format, char **returnString) in GetAlg25519PubKeyEncodedPem() 210 static HcfResult GetAlg25519PriKeyEncoded(HcfKey *self, HcfBlob *returnBlob) in GetAlg25519PriKeyEncoded() 237 static HcfResult GetAlg25519PriKeyEncodedPem(HcfKey *self, const char *format, char **returnString) in GetAlg25519PriKeyEncodedPem() 245 static const char *GetAlg25519PubKeyFormat(HcfKey *self) in GetAlg25519PubKeyFormat() 258 static const char *GetAlg25519PriKeyFormat(HcfKey *self) in GetAlg25519PriKeyFormat()
|
/ohos5.0/base/security/crypto_framework/frameworks/native/src/ |
H A D | sym_key.c | 40 HcfKey key; 94 return keyCtx->key.getAlgorithm((HcfKey *)keyCtx); in OH_CryptoSymKey_GetAlgoName() 102 HcfResult ret = keyCtx->key.getEncoded((HcfKey *)keyCtx, (HcfBlob *)out); in OH_CryptoSymKey_GetKeyData()
|
H A D | sym_cipher.c | 31 HcfKey *key, HcfParamsSpec *params); 54 HcfKey key; 119 …HcfResult ret = ctx->init((HcfCipher *)ctx, (enum HcfCryptoMode)mod, (HcfKey *)key, (HcfParamsSpec… in OH_CryptoSymCipher_Init()
|
H A D | asym_key.c | 54 HcfKey base; 154 ret = key->base.getEncodedPem((HcfKey *)key, encodingStandard, &pemStr); in OH_CryptoPubKey_Encode() 168 … : key->base.getEncoded((HcfKey *)key, (HcfBlob *)out); in OH_CryptoPubKey_Encode()
|
/ohos5.0/base/security/crypto_framework/frameworks/cj/src/ |
H A D | key_impl.cpp | 19 KeyImpl::KeyImpl(HcfKey *hcfKey) in KeyImpl() 26 HcfKey *KeyImpl::GetHcfKey() const in GetHcfKey()
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/common/inc/ |
H A D | ecc_openssl_common.h | 35 HcfResult GetFieldType(const HcfKey *self, const bool isPrivate, char **returnString); 36 HcfResult GetPkSkBigInteger(const HcfKey *self, bool isPrivate,
|
/ohos5.0/base/security/crypto_framework/test/unittest/src/aes_cipher/ |
H A D | aes_common.cpp | 162 int32_t ret = cipher->init(cipher, ENCRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in AesMultiBlockEncrypt() 216 int32_t ret = cipher->init(cipher, DECRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in AesMultiBlockDecrypt() 307 int32_t ret = cipher->init(cipher, ENCRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in AesEncrypt() 352 int32_t ret = cipher->init(cipher, DECRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in AesDecrypt() 456 int32_t ret = cipher->init(cipher, ENCRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in AesNoUpdateEncrypt() 488 int32_t ret = cipher->init(cipher, DECRYPT_MODE, reinterpret_cast<HcfKey *>(key), params); in AesNoUpdateDecrypt()
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/signature/src/ |
H A D | signature_rsa_openssl.c | 129 static HcfResult CheckInitKeyType(HcfKey *key, bool signing) in CheckInitKeyType() 145 static EVP_PKEY *InitRsaEvpKey(const HcfKey *key, bool signing) in InitRsaEvpKey() 199 EVP_PKEY *dupKey = InitRsaEvpKey((HcfKey *)privateKey, true); in SetOnlySignParams() 241 EVP_PKEY *dupKey = InitRsaEvpKey((HcfKey *)privateKey, true); in SetSignParams() 290 if (CheckInitKeyType((HcfKey *)privateKey, true) != HCF_SUCCESS) { in EngineSignInit() 310 EVP_PKEY *dupKey = InitRsaEvpKey((HcfKey *)publicKey, false); in SetVerifyParams() 345 EVP_PKEY *dupKey = InitRsaEvpKey((HcfKey *)publicKey, false); in SetVerifyRecoverParams() 407 if (CheckInitKeyType((HcfKey *)publicKey, false) != HCF_SUCCESS) { in EngineVerifyInit()
|
/ohos5.0/base/security/crypto_framework/plugin/openssl_plugin/crypto_operation/cipher/src/ |
H A D | cipher_sm2_openssl.c | 44 static HcfResult CheckCipherInitParams(enum HcfCryptoMode opMode, HcfKey *key) in CheckCipherInitParams() 67 static HcfResult InitSm2Key(HcfCipherSm2GeneratorSpiImpl *impl, HcfKey *key, enum HcfCryptoMode opM… in InitSm2Key() 120 HcfKey *key, HcfParamsSpec *params) in EngineInit()
|
/ohos5.0/base/security/crypto_framework/test/fuzztest/crypto_operation/hcfciphercreate_fuzzer/ |
H A D | hcfciphercreate_fuzzer.cpp | 118 int32_t ret = cipher->init(cipher, ENCRYPT_MODE, reinterpret_cast<HcfKey *>(key), nullptr); in Sm4Encrypt() 159 int32_t ret = cipher->init(cipher, DECRYPT_MODE, reinterpret_cast<HcfKey *>(key), nullptr); in Sm4Decrypt() 328 … (void)cipher->init(cipher, ENCRYPT_MODE, reinterpret_cast<HcfKey *>(keyPair->pubKey), nullptr); in TestRsaCipher() 340 … (void)cipher->init(cipher, DECRYPT_MODE, reinterpret_cast<HcfKey *>(keyPair->priKey), nullptr); in TestRsaCipher()
|