harmony 鸿蒙crypto_sym_cipher.h
crypto_sym_cipher.h
Overview
Provides APIs for symmetric encryption and decryption.
Library: libohcrypto.so
System capability: SystemCapability.Security.CryptoFramework
Since: 12
Related module: CryptoSymCipherApi
Summary
Types
Name | Description |
---|---|
typedef struct OH_CryptoSymCipher OH_CryptoSymCipher | Defines a symmetric encryption and decryption instance. |
typedef struct OH_CryptoSymCipherParams OH_CryptoSymCipherParams | Defines symmetric encryption and decryption parameters. |
Enums
Name | Description |
---|---|
CryptoSymCipher_ParamsType { CRYPTO_IV_DATABLOB = 100, CRYPTO_AAD_DATABLOB = 101, CRYPTO_TAG_DATABLOB = 102 } |
Enumerates the types of symmetric encryption and decryption parameters. |
Functions
Name | Description |
---|---|
OH_Crypto_ErrCode OH_CryptoSymCipherParams_Create (OH_CryptoSymCipherParams **params) | Creates a symmetric encryption/decryption parameter instance. |
OH_Crypto_ErrCode OH_CryptoSymCipherParams_SetParam (OH_CryptoSymCipherParams *params, CryptoSymCipher_ParamsType paramsType, Crypto_DataBlob *value) | Sets symmetric encryption/decryption parameters. |
void OH_CryptoSymCipherParams_Destroy (OH_CryptoSymCipherParams *params) | Destroys a symmetric encryption/decryption parameter instance. |
OH_Crypto_ErrCode OH_CryptoSymCipher_Create (const char *algoName, OH_CryptoSymCipher **ctx) | Creates a symmetric encryption/decryption instance based on the given algorithm name. |
OH_Crypto_ErrCode OH_CryptoSymCipher_Init (OH_CryptoSymCipher *ctx, Crypto_CipherMode mod, OH_CryptoSymKey *key, OH_CryptoSymCipherParams *params) | Initializes a symmetric encryption/decryption instance. |
OH_Crypto_ErrCode OH_CryptoSymCipher_Update (OH_CryptoSymCipher *ctx, Crypto_DataBlob *in, Crypto_DataBlob *out) | Updates the data to be encrypted or decrypted. |
OH_Crypto_ErrCode OH_CryptoSymCipher_Final (OH_CryptoSymCipher *ctx, Crypto_DataBlob *in, Crypto_DataBlob *out) | Finishes the encryption or decryption operation. |
const char * OH_CryptoSymCipher_GetAlgoName (OH_CryptoSymCipher *ctx) | Obtains the symmetric encryption/decryption algorithm. |
void OH_CryptoSymCipher_Destroy (OH_CryptoSymCipher *ctx) | Destroys a symmetric encryption/decryption instance. |
你可能感兴趣的鸿蒙文章
harmony 鸿蒙Crypto Architecture Kit (Crypto Architecture Service)
0
赞
- 所属分类: 后端技术
- 本文标签:
热门推荐
-
2、 - 优质文章
-
3、 gate.io
-
8、 golang
-
9、 openharmony
-
10、 Vue中input框自动聚焦