[][src]Function hactool_sys::mbedtls_cipher_update

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

\brief Generic cipher update function. Encrypts/decrypts using the given cipher context. Writes as many block size'd blocks of data as possible to output. Any data that cannot be written immediately will either be added to the next block, or flushed when cipher_final is called. Exception: for MBEDTLS_MODE_ECB, expects single block in size (e.g. 16 bytes for AES)

\param ctx generic cipher context \param input buffer holding the input data \param ilen length of the input data \param output buffer for the output data. Should be able to hold at least ilen + block_size. Cannot be the same buffer as input! \param olen length of the output data, will be filled with the actual number of bytes written.

\returns 0 on success, MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA if parameter verification fails, MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE on an unsupported mode for a cipher or a cipher specific error code.

\note If the underlying cipher is GCM, all calls to this function, except the last one before mbedtls_cipher_finish(), must have ilen a multiple of the block size.