Set the CCM nonce and message length for a subsequent encrypt or decrypt.
Declared in <openssl/modes.h>
int
CRYPTO_ccm128_setiv(
CCM128_CONTEXT* ctx,
unsigned char const* nonce,
size_t nlen,
size_t mlen);
0 on success, or -1 if nlen is too short for the configured L.
| Name | Description |
|---|---|
| ctx | CCM context from CRYPTO_ccm128_init(). |
| nonce | Nonce octets; length must be at least 15 - L for the configured L. |
| nlen | Length of nonce in bytes. |
| mlen | Length of the message that will be encrypted or decrypted. |