Encrypt data using the specified AEAD cipher algorithm state
Synopsis:
#include <dev/crypto/devcrypto_plugin.h>
typedef int(* devcrypto_aead_cipher_op_encrypt)(devcrypto_state_ctx_t *sctx,
const uint8_t *in,
uint32_t insize,
uint8_t *aad,
uint32_t aadsize,
uint8_t *tag,
uint32_t tagsize,
uint8_t *out,
uint32_t *outsize);
Arguments:
- sctx
- The state context.
- in
- The plaintext buffer to encrypt.
- insize
- The size of the input buffer.
- aad
- The Additional Authentication Data (AAD) buffer.
- aadsize
- The AAD buffer size.
- tag
- The tag value produced by encryption.
- tagsize
- The size of the tag buffer.
- out
- The encrypted plaintext (ciphertext).
- outsize
- The size of the output buffer and the encrypted data.
Library:
devcr
Returns:
EOK if successful or errno if an error occurred.