mbedtls_block_cipher_setkey() function
Set the key into the context.
Arguments
ctx
The context to configure.
key
The buffer holding the key material.
key_bitlen
The size of the key in bits.
Return value
\c 0 on success. #MBEDTLS_ERR_CIPHER_INVALID_CONTEXT if the context was not properly set up before calling this function. One of #MBEDTLS_ERR_AES_INVALID_KEY_LENGTH, #MBEDTLS_ERR_ARIA_BAD_INPUT_DATA, #MBEDTLS_ERR_CAMELLIA_BAD_INPUT_DATA if \p key_bitlen is invalid.