mbedtls_cipher_write_tag() function
This function writes a tag for AEAD ciphers. Currently supported with GCM and ChaCha20+Poly1305. This must be called after mbedtls_cipher_finish().
Arguments
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.
tag
The buffer to write the tag to. This must be a writable buffer of at least \p tag_len Bytes.
tag_len
The length of the tag to write.
Return value
\c 0 on success. A specific error code on failure.
Functions called by mbedtls_cipher_write_tag()
mbedtls_cipher_write_tag()
Data read by mbedtls_cipher_write_tag()
mbedtls_cipher_write_tag()