[][src]Function hactool_sys::mbedtls_cipher_setup

pub unsafe extern "C" fn mbedtls_cipher_setup(
    ctx: *mut mbedtls_cipher_context_t,
    cipher_info: *const mbedtls_cipher_info_t
) -> c_int

\brief Initialises and fills the cipher context structure with the appropriate values.

\note Currently also clears structure. In future versions you will be required to call mbedtls_cipher_init() on the structure first.

\param ctx context to initialise. May not be NULL. \param cipher_info cipher to use.

\return 0 on success, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on parameter failure, MBEDTLS_ERR_CIPHER_ALLOC_FAILED if allocation of the cipher-specific context failed.