Searched refs:keyCtx (Results 1 - 6 of 6) sorted by relevance
/base/security/crypto_framework/frameworks/native/src/ |
H A D | sym_key.c | 54 OH_Crypto_ErrCode OH_CryptoSymKeyGenerator_Generate(OH_CryptoSymKeyGenerator *ctx, OH_CryptoSymKey **keyCtx) in OH_CryptoSymKeyGenerator_Generate() argument 56 if ((ctx == NULL) || (ctx->generateSymKey == NULL) || (keyCtx == NULL)) { in OH_CryptoSymKeyGenerator_Generate() 59 HcfResult ret = ctx->generateSymKey((HcfSymKeyGenerator *)ctx, (HcfSymKey **)keyCtx); in OH_CryptoSymKeyGenerator_Generate() 64 const Crypto_DataBlob *keyData, OH_CryptoSymKey **keyCtx) in OH_CryptoSymKeyGenerator_Convert() 66 if ((ctx == NULL) || (ctx->convertSymKey == NULL) || (keyData == NULL) || (keyCtx == NULL)) { in OH_CryptoSymKeyGenerator_Convert() 69 HcfResult ret = ctx->convertSymKey((HcfSymKeyGenerator *)ctx, (HcfBlob *)keyData, (HcfSymKey **)keyCtx); in OH_CryptoSymKeyGenerator_Convert() 89 const char *OH_CryptoSymKey_GetAlgoName(OH_CryptoSymKey *keyCtx) in OH_CryptoSymKey_GetAlgoName() argument 91 if (keyCtx == NULL || (keyCtx->key.getAlgorithm == NULL)) { in OH_CryptoSymKey_GetAlgoName() 94 return keyCtx in OH_CryptoSymKey_GetAlgoName() 63 OH_CryptoSymKeyGenerator_Convert(OH_CryptoSymKeyGenerator *ctx, const Crypto_DataBlob *keyData, OH_CryptoSymKey **keyCtx) OH_CryptoSymKeyGenerator_Convert() argument 97 OH_CryptoSymKey_GetKeyData(OH_CryptoSymKey *keyCtx, Crypto_DataBlob *out) OH_CryptoSymKey_GetKeyData() argument 106 OH_CryptoSymKey_Destroy(OH_CryptoSymKey *keyCtx) OH_CryptoSymKey_Destroy() argument [all...] |
H A D | asym_key.c | 75 OH_Crypto_ErrCode OH_CryptoAsymKeyGenerator_Generate(OH_CryptoAsymKeyGenerator *ctx, OH_CryptoKeyPair **keyCtx) in OH_CryptoAsymKeyGenerator_Generate() argument 77 if ((ctx == NULL) || (ctx->generateKeyPair == NULL) || (keyCtx == NULL)) { in OH_CryptoAsymKeyGenerator_Generate() 80 HcfResult ret = ctx->generateKeyPair((HcfAsyKeyGenerator *)ctx, NULL, (HcfKeyPair **)keyCtx); in OH_CryptoAsymKeyGenerator_Generate() 85 Crypto_DataBlob *pubKeyData, Crypto_DataBlob *priKeyData, OH_CryptoKeyPair **keyCtx) in OH_CryptoAsymKeyGenerator_Convert() 87 if ((ctx == NULL) || (pubKeyData == NULL && priKeyData == NULL) || (keyCtx == NULL)) { in OH_CryptoAsymKeyGenerator_Convert() 96 ctx->convertPemKey((HcfAsyKeyGenerator *)ctx, NULL, pubKeyStr, priKeyStr, (HcfKeyPair **)keyCtx); in OH_CryptoAsymKeyGenerator_Convert() 101 (HcfBlob *)priKeyData, (HcfKeyPair **)keyCtx); in OH_CryptoAsymKeyGenerator_Convert() 125 void OH_CryptoKeyPair_Destroy(OH_CryptoKeyPair *keyCtx) in OH_CryptoKeyPair_Destroy() argument 127 if ((keyCtx == NULL) || (keyCtx in OH_CryptoKeyPair_Destroy() 84 OH_CryptoAsymKeyGenerator_Convert(OH_CryptoAsymKeyGenerator *ctx, Crypto_EncodingType type, Crypto_DataBlob *pubKeyData, Crypto_DataBlob *priKeyData, OH_CryptoKeyPair **keyCtx) OH_CryptoAsymKeyGenerator_Convert() argument 133 OH_CryptoKeyPair_GetPubKey(OH_CryptoKeyPair *keyCtx) OH_CryptoKeyPair_GetPubKey() argument [all...] |
/base/security/crypto_framework/interfaces/kits/native/include/ |
H A D | crypto_sym_key.h | 77 * @param keyCtx Indicates the pointer to the symmetric key context. 85 OH_Crypto_ErrCode OH_CryptoSymKeyGenerator_Generate(OH_CryptoSymKeyGenerator *ctx, OH_CryptoSymKey **keyCtx); 92 * @param keyCtx Indicates the pointer to the symmetric key context. 101 const Crypto_DataBlob *keyData, OH_CryptoSymKey **keyCtx); 123 * @param keyCtx Indicates the symmetric key context. 127 const char *OH_CryptoSymKey_GetAlgoName(OH_CryptoSymKey *keyCtx); 132 * @param keyCtx Indicates the symmetric key context. 141 OH_Crypto_ErrCode OH_CryptoSymKey_GetKeyData(OH_CryptoSymKey *keyCtx, Crypto_DataBlob *out); 146 * @param keyCtx Indicates the symmetric key context. 149 void OH_CryptoSymKey_Destroy(OH_CryptoSymKey *keyCtx); [all...] |
H A D | crypto_asym_key.h | 168 * @param keyCtx Indicates the pointer to the asyKey context. 176 OH_Crypto_ErrCode OH_CryptoAsymKeyGenerator_Generate(OH_CryptoAsymKeyGenerator *ctx, OH_CryptoKeyPair **keyCtx); 185 * @param keyCtx Indicates the pointer to the keyPair instance. 194 Crypto_DataBlob *pubKeyData, Crypto_DataBlob *priKeyData, OH_CryptoKeyPair **keyCtx); 216 * @param keyCtx Indicates the keyPair context. 219 void OH_CryptoKeyPair_Destroy(OH_CryptoKeyPair *keyCtx); 224 * @param keyCtx Indicates the keyPair context. 228 OH_CryptoPubKey *OH_CryptoKeyPair_GetPubKey(OH_CryptoKeyPair *keyCtx);
|
/base/security/crypto_framework/test/unittest/src/native/ |
H A D | native_asym_key_test.cpp | 59 OH_CryptoKeyPair *keyCtx = nullptr; in HWTEST_F() local 62 ret = OH_CryptoAsymKeyGenerator_Generate(generator, &keyCtx); in HWTEST_F() 68 OH_CryptoPubKey *pubKey = OH_CryptoKeyPair_GetPubKey(keyCtx); in HWTEST_F() 76 OH_CryptoKeyPair_Destroy(keyCtx); in HWTEST_F() 121 OH_CryptoKeyPair *keyCtx = nullptr; in HWTEST_F() local 124 ret = OH_CryptoAsymKeyGenerator_Generate(generator, &keyCtx); in HWTEST_F() 127 OH_CryptoPubKey *pubKey = OH_CryptoKeyPair_GetPubKey(keyCtx); in HWTEST_F() 134 OH_CryptoKeyPair_Destroy(keyCtx); in HWTEST_F()
|
H A D | native_signature_test.cpp | 95 OH_CryptoAsymKeyGenerator *keyCtx = nullptr; in HWTEST_F() local 133 ASSERT_EQ(OH_CryptoAsymKeyGenerator_Create((const char *)"ECC256", &keyCtx), CRYPTO_SUCCESS); in HWTEST_F() 134 ASSERT_EQ(OH_CryptoAsymKeyGenerator_Convert(keyCtx, CRYPTO_DER, &keyBlob, nullptr, &keyPair), CRYPTO_SUCCESS); in HWTEST_F() 142 OH_CryptoAsymKeyGenerator_Destroy(keyCtx); in HWTEST_F()
|
Completed in 3 milliseconds