harmony 鸿蒙crypto_sym_key.h

2025-06-12 浏览 (1)

crypto_sym_key.h

Overview

Provides APIs for symmetric key operations.

Library: libohcrypto.so

System capability: SystemCapability.Security.CryptoFramework

Since: 12

Related module: CryptoSymKeyApi

Summary

Types

NameDescription
typedef struct OH_CryptoSymKey OH_CryptoSymKeyDefines a struct for a symmetric key.
typedef struct OH_CryptoSymKeyGenerator OH_CryptoSymKeyGeneratorDefines a struct for a symmetric key generator.

Functions

NameDescription
OH_Crypto_ErrCode OH_CryptoSymKeyGenerator_Create (const char *algoName, OH_CryptoSymKeyGenerator **ctx)Creates a symmetric key generator instance based on the given algorithm name.
OH_Crypto_ErrCode OH_CryptoSymKeyGenerator_Generate (OH_CryptoSymKeyGenerator *ctx, OH_CryptoSymKey **keyCtx)Randomly generates a symmetric key.
OH_Crypto_ErrCode OH_CryptoSymKeyGenerator_Convert (OH_CryptoSymKeyGenerator *ctx, const Crypto_DataBlob *keyData, OH_CryptoSymKey **keyCtx)Converts binary data into a symmetric key.
const char * OH_CryptoSymKeyGenerator_GetAlgoName (OH_CryptoSymKeyGenerator *ctx)Obtains the algorithm of a symmetric key generator instance.
void OH_CryptoSymKeyGenerator_Destroy (OH_CryptoSymKeyGenerator *ctx)Destroys a symmetric key generator instance.
const char * OH_CryptoSymKey_GetAlgoName (OH_CryptoSymKey *keyCtx)Obtains the algorithm of a symmetric key.
OH_Crypto_ErrCode OH_CryptoSymKey_GetKeyData (OH_CryptoSymKey *keyCtx, Crypto_DataBlob *out)Obtains symmetric key data from a key instance.
void OH_CryptoSymKey_Destroy (OH_CryptoSymKey *keyCtx)Destroys a symmetric key instance.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Crypto Architecture Kit (Crypto Architecture Service)

harmony 鸿蒙Crypto_DataBlob

harmony 鸿蒙CryptoAsymKeyApi

harmony 鸿蒙CryptoCommonApi

harmony 鸿蒙CryptoDigestApi

harmony 鸿蒙CryptoSignatureApi

harmony 鸿蒙CryptoSymCipherApi

harmony 鸿蒙CryptoSymKeyApi

harmony 鸿蒙crypto_asym_key.h

harmony 鸿蒙crypto_common.h

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/q8cD7o