mbedtls_cipher_write_tag() is only used within mbedTLS.
 
Symbols
loading...
Files
loading...

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().

Syntax

int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx,     unsigned char *tag,     size_t tag_len );
Implemented in cipher.c:903

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.

References

LocationText
cipher.c:903
int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx,
cipher.h:729
int mbedtls_cipher_write_tag( mbedtls_cipher_context_t *ctx,