mbedtls_ccm_setkey() function
This function initializes the CCM context set in the \p ctx parameter and sets the encryption key.
Arguments
ctx
The CCM context to initialize. This must be an initialized context.
cipher
The 128-bit block cipher to use.
key
The encryption key. This must not be \c NULL.
keybits
The key size in bits. This must be acceptable by the cipher.
Return value
\c 0 on success. A CCM or cipher-specific error code on failure.