plusaes
CTR

Functions

Error plusaes::crypt_ctr (unsigned char *data, const std::size_t data_size, const unsigned char *key, const std::size_t key_size, const unsigned char(*nonce)[16])
 

Detailed Description

CTR mode function

Function Documentation

◆ crypt_ctr()

Error plusaes::crypt_ctr ( unsigned char *  data,
const std::size_t  data_size,
const unsigned char *  key,
const std::size_t  key_size,
const unsigned char(*)  nonce[16] 
)
inline

Encrypts or decrypt data in-place with CTR mode.

Parameters
[in,out]dataInput data and output buffer. This buffer is replaced with encrypted / decrypted data.
[in]data_sizeData size.
[in]keyCipher key
[in]key_sizeCipher key size. This value must be 16 (128-bit), 24 (192-bit), or 32 (256-bit).
[in]nonceNonce of the counter initialization.
Returns
kErrorOk
kErrorInvalidKeySize
Since
1.0.0