devcrypto_cipher_op_encrypt

Encrypt data using the specified cipher algorithm state

Synopsis:

#include <dev/crypto/devcrypto_plugin.h>
typedef int(* devcrypto_cipher_op_encrypt)(devcrypto_state_ctx_t *sctx,
            const uint8_t *in,
            uint32_t insize,
            uint8_t *out,
            uint32_t *outsize);

Arguments:

sctx
The state context.
in
The plaintext to encrypt.
insize
The size of the input buffer.
out
The encrypted plaintext (ciphertext).
outsize
The size of the output buffer and encrypted data.

Library:

devcr

Returns:

EOK if successful or errno if an error occurred.