15#ifndef CRYPT_EAL_CIPHER_H
16#define CRYPT_EAL_CIPHER_H
84 uint32_t ivLen,
bool enc);
CRYPT_CIPHER_AlgId
Symmetric algorithm mode ID
Definition crypt_algid.h:122
struct CryptEalCipherCtx CRYPT_EAL_CipherCtx
Definition crypt_eal_cipher.h:28
CRYPT_PaddingType
Definition crypt_types.h:426
int32_t CRYPT_EAL_CipherGetInfo(CRYPT_CIPHER_AlgId id, int32_t type, uint32_t *infoValue)
Obtain the type of an algorithm based on the algorithm ID.
int32_t CRYPT_EAL_CipherGetPadding(CRYPT_EAL_CipherCtx *ctx)
Obtain the padding type.
int32_t CRYPT_EAL_CipherInit(CRYPT_EAL_CipherCtx *ctx, const uint8_t *key, uint32_t keyLen, const uint8_t *iv, uint32_t ivLen, bool enc)
Initialize the symmetric encryption/decryption handle. The key cannot be null. Except the ECB mode,...
int32_t CRYPT_EAL_CipherUpdate(CRYPT_EAL_CipherCtx *ctx, const uint8_t *in, uint32_t inLen, uint8_t *out, uint32_t *outLen)
int32_t CRYPT_EAL_CipherCtrl(CRYPT_EAL_CipherCtx *ctx, int32_t type, void *data, uint32_t len)
void CRYPT_EAL_CipherDeinit(CRYPT_EAL_CipherCtx *ctx)
Deinitialize the handle and restore the handle to the state, when the CRYPT_EAL_CipherNewCtx function...
int32_t CRYPT_EAL_CipherSetPadding(CRYPT_EAL_CipherCtx *ctx, CRYPT_PaddingType type)
Set the padding mode.
void CRYPT_EAL_CipherFreeCtx(CRYPT_EAL_CipherCtx *ctx)
Release the symmetric encryption/decryption handle. Clear sensitive information before releasing the ...
int32_t CRYPT_EAL_CipherReinit(CRYPT_EAL_CipherCtx *ctx, uint8_t *iv, uint32_t ivLen)
CRYPT_EAL_CipherCtx * CRYPT_EAL_CipherNewCtx(CRYPT_CIPHER_AlgId id)
Generate symmetric encryption and decryption handles.
bool CRYPT_EAL_CipherIsValidAlgId(CRYPT_CIPHER_AlgId id)
Check whether the given symmetric algorithm ID is valid.
int32_t CRYPT_EAL_CipherFinal(CRYPT_EAL_CipherCtx *ctx, uint8_t *out, uint32_t *outLen)
Fill the data with the size of the block and output the encrypted data; the AEAD tag is obtained thro...