qcrypto_cipher_init()

Updated: April 19, 2023

Initialize a cipher

Synopsis:

#include <qcrypto/qcrypto.h>
int qcrypto_cipher_init(qcrypto_ctx_t *ctx,
                        qcrypto_key_t *key,
                        const qcrypto_cipher_args_t *cargs)

Arguments:

ctx
The algorithm context object.
key
The symmetric key.
cargs
The cipher arguments.

Library:

libqcrypto

Description:

This function initializes a cipher. Whenever you call it, make sure that you finalize any operation that it successfully initializes with qcrypto_cipher_final() (following the appropriate encryption and decryption operations).

See also qcrypto_cipher_args_t.

Returns:

QCRYPTO_R_EOK if successful or qcrypto_errno if an error occurred.