Updated: October 28, 2024 |
Initialize a cipher algorithm state
#include <dev/crypto/devcrypto_plugin.h>
typedef int(* devcrypto_cipher_op_init)(devcrypto_state_ctx_t *sctx, const uint8_t *key, uint32_t keysize, const uint8_t *iv, uint32_t ivsize, int encrypt);
Because devcrypto works using ciphers with no padding, plugins need to make sure that cipher padding is turned off. The caller is responsible for providing the cipher with padded and aligned data.
EOK if successful or errno if an error occurred.