openHiTLS API openHiTLS 0.1.0-Alpha1
|
cipher suites 更多...
函数 | |
bool | CRYPT_EAL_CipherIsValidAlgId (CRYPT_CIPHER_AlgId id) |
Check whether the given symmetric algorithm ID is valid. | |
CRYPT_EAL_CipherCtx * | CRYPT_EAL_CipherNewCtx (CRYPT_CIPHER_AlgId id) |
Generate symmetric encryption and decryption handles. | |
void | CRYPT_EAL_CipherFreeCtx (CRYPT_EAL_CipherCtx *ctx) |
Release the symmetric encryption/decryption handle. Clear sensitive information before releasing the handle. | |
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, other modes iv cannot be null. | |
void | CRYPT_EAL_CipherDeinit (CRYPT_EAL_CipherCtx *ctx) |
Deinitialize the handle and restore the handle to the state, when the CRYPT_EAL_CipherNewCtx function is called. | |
int32_t | CRYPT_EAL_CipherReinit (CRYPT_EAL_CipherCtx *ctx, uint8_t *iv, uint32_t ivLen) |
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_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 through CRYPT_EAL_CipherCtrl. For block encryption algorithms such as CBC and ECB, padding must be set, In XTS mode, final needs to be called to obtain the last two blocks. | |
int32_t | CRYPT_EAL_CipherCtrl (CRYPT_EAL_CipherCtx *ctx, int32_t type, void *data, uint32_t len) |
int32_t | CRYPT_EAL_CipherSetPadding (CRYPT_EAL_CipherCtx *ctx, CRYPT_PaddingType type) |
Set the padding mode. | |
int32_t | CRYPT_EAL_CipherGetPadding (CRYPT_EAL_CipherCtx *ctx) |
Obtain the padding type. | |
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. | |
cipher suites