pub unsafe extern "C" fn mbedtls_cipher_update(
    ctx: *mut mbedtls_cipher_context_t,
    input: *const u8,
    ilen: usize,
    output: *mut u8,
    olen: *mut usize
) -> i32
Expand description

\brief The generic cipher update function. It encrypts or decrypts using the given cipher context. Writes as many block-sized blocks of data as possible to output. Any data that cannot be written immediately is either added to the next block, or flushed when mbedtls_cipher_finish() is called. Exception: For MBEDTLS_MODE_ECB, expects a single block in size. For example, 16 Bytes for AES.

\param ctx The generic cipher context. This must be initialized and bound to a key. \param input The buffer holding the input data. This must be a readable buffer of at least \p ilen Bytes. \param ilen The length of the input data. \param output The buffer for the output data. This must be able to hold at least ilen + block_size. This must not be the same buffer as \p input. \param olen The length of the output data, to be updated with the actual number of Bytes written. This must not be \c NULL.

\return \c 0 on success. \return #MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA on parameter-verification failure. \return #MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE on an unsupported mode for a cipher. \return A cipher-specific error code on failure.