[][src]Function hactool_sys::mbedtls_cipher_finish

pub unsafe extern "C" fn mbedtls_cipher_finish(
    ctx: *mut mbedtls_cipher_context_t,
    output: *mut c_uchar,
    olen: *mut usize
) -> c_int

\brief Generic cipher finalisation function. If data still needs to be flushed from an incomplete block, data contained within it will be padded with the size of the last block, and written to the output buffer.

\param ctx Generic cipher context \param output buffer to write data to. Needs block_size available. \param olen length of the data written to the output buffer.

\returns 0 on success, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if parameter verification fails, MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED if decryption expected a full block but was not provided one, MBEDTLS_ERR_CIPHER_INVALID_PADDING on invalid padding while decrypting or a cipher specific error code.