gnutls_aead_cipher_encrypt3
Api function
Arguments
- gnutls_aead_cipher_hd_t handle
-
is a
gnutls_aead_cipher_hd_ttype.
- const void * nonce
-
the nonce to set
- size_t nonce_len
-
The length of the nonce
- const void * auth
-
additional data to be authenticated
- size_t auth_len
-
The length of the data
- size_t tag_size
-
The size of the tag to use (use zero for the default)
- const void * ptext
-
the data to encrypt
- size_t ptext_len
-
The length of data to encrypt
- void * ctext
-
the encrypted data including authentication tag
- size_t * ctext_len
-
the length of encrypted data (initially must hold the maximum available size, including space for tag)
Overview
This function will encrypt the given data using the algorithm specified by the context. The output data will contain the authentication tag.
Returns
Zero or a negative error code on error.
Since
3.4.0
History
- Arch Linux 2026-11-01: the text shown here
- Debian 13 (Trixie)
- Debian 12 (Bookworm)
- Debian 11 (Bullseye)
- Debian 10 (Buster)
- Debian 9 (Stretch)