[][src]Function hactool_sys::mbedtls_cipher_setkey

pub unsafe extern "C" fn mbedtls_cipher_setkey(
    ctx: *mut mbedtls_cipher_context_t,
    key: *const c_uchar,
    key_bitlen: c_int,
    operation: mbedtls_operation_t
) -> c_int

\brief Set the key to use with the given context.

\param ctx generic cipher context. May not be NULL. Must have been initialised using cipher_context_from_type or cipher_context_from_string. \param key The key to use. \param key_bitlen key length to use, in bits. \param operation Operation that the key will be used for, either MBEDTLS_ENCRYPT or MBEDTLS_DECRYPT.

\returns 0 on success, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if parameter verification fails or a cipher specific error code.