pub unsafe extern "C" fn mbedtls_chachapoly_update(
    ctx: *mut mbedtls_chachapoly_context,
    len: usize,
    input: *const c_uchar,
    output: *mut c_uchar
) -> c_int
Expand description

\brief Thus function feeds data to be encrypted or decrypted into an on-going ChaCha20-Poly1305 operation.

             The direction (encryption or decryption) depends on the
             mode that was given when calling
             \c mbedtls_chachapoly_starts().

             You may call this function multiple times to process
             an arbitrary amount of data. It is permitted to call
             this function 0 times, if no data is to be encrypted
             or decrypted.

\warning Decryption with the piecewise API is discouraged, see the warning on \c mbedtls_chachapoly_init().

\param ctx The ChaCha20-Poly1305 context to use. This must be initialized. \param len The length (in bytes) of the data to encrypt or decrypt. \param input The buffer containing the data to encrypt or decrypt. This pointer can be \c NULL if len == 0. \param output The buffer to where the encrypted or decrypted data is written. This must be able to hold \p len bytes. This pointer can be \c NULL if len == 0.

\return \c 0 on success. \return #MBEDTLS_ERR_CHACHAPOLY_BAD_STATE if the operation has not been started or has been finished. \return Another negative error code on other kinds of failure.