pub unsafe extern "C" fn mbedtls_cipher_write_tag(
    ctx: *mut mbedtls_cipher_context_t,
    tag: *mut c_uchar,
    tag_len: usize
) -> c_int
Expand description

\brief This function writes a tag for AEAD ciphers. Currently supported with GCM and ChaCha20+Poly1305. This must be called after mbedtls_cipher_finish().

\param ctx The generic cipher context. This must be initialized, bound to a key, and have just completed a cipher operation through mbedtls_cipher_finish() the tag for which should be written. \param tag The buffer to write the tag to. This must be a writable buffer of at least \p tag_len Bytes. \param tag_len The length of the tag to write.

\return \c 0 on success. \return A specific error code on failure.