gnutls_aead_cipher_encryptv(3)
โจ gnutls_aead_cipher_encryptv โจ
okay bestie so this one lives in the gnutls manual, and it's literally the glow-up function that takes your plain data and turns it into AEAD-encrypted โจmystery textโจ with an authentication tag riding along. ๐
๐ธ NAME ๐ธ
gnutls_aead_cipher_encryptv โ it's an API function, and it's giving "encrypt my stuff and prove nobody touched it" energy. ๐
๐ฆ SYNOPSIS ๐ฆ
#include <gnutls/crypto.h>
int gnutls_aead_cipher_encryptv(gnutls_aead_cipher_hd_t handle, const
void * nonce, size_t nonce_len, const giovec_t * auth_iov, int
auth_iovcnt, size_t tag_size, const giovec_t * iov, int iovcnt, void *
ctext, size_t * ctext_len);
like. look at all those parameters. it's a lot but we're gonna get through it together, fr fr. ๐
๐ ARGUMENTS ๐
gnutls_aead_cipher_hd_t handleโ it's agnutls_aead_cipher_hd_ttype, no cap. that's the whole description and honestly? iconic for being so brief.const void * nonceโ the nonce to set. that's the little one-time-only sparkle โจ that keeps your encryption from getting predictable.size_t nonce_lenโ The length of the nonce. gotta tell it how big your nonce is, bestie.const giovec_t * auth_iovโ additional data to be authenticated. this part gets verified but not encrypted, iykyk.int auth_iovcntโ The number of buffers inauth_iov. count them. ๐งฎsize_t tag_sizeโ The size of the tag to use (use zero for the default). and yes,0means "you pick, boo" ๐ซถconst giovec_t * iovโ the data to be encrypted. the main character of this whole situation. ๐int iovcntโ The number of buffers iniov.void * ctextโ the encrypted data including authentication tag. so it's not just the ciphertext, the tag is in there too, don't forget. ๐ญsize_t * ctext_lenโ the length of encrypted data (initially must hold the maximum available size, including space for tag). and listen. INITIALLY. it has to already contain the max size you can handle plus room for the tag, before you even call this. it's an in-out param, it's doing double duty, it's booked and busy. ๐
๐ DESCRIPTION ๐
This function will encrypt the provided data buffers using the algorithm specified by the context. The output data will contain the authentication tag.
that's the tea. you hand it your buffers, it hands back encrypted data with the tag baked in. ๐
๐ RETURNS ๐
Zero or a negative error code on error.
so: 0 = slay โ
, anything negative = something went wrong ๐ญ
โญ SINCE โญ
3.6.3
been here since 3.6.3, an OG. ๐
๐ REPORTING BUGS ๐
Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org
found a bug? don't just suffer in silence, bestie, email them. they want to know. ๐ซถ
๐ COPYRIGHT ๐
Copyright ยฉ 2001-2023 Free Software Foundation, Inc., and others. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
so basically: copy it, share it, remix it, just keep the copyright notice and this notice intact. periodt. ๐
๐ง SEE ALSO ๐ง
The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form visit
https://www.gnutls.org/manual/
like if the local docs aren't giving what they need to give, the website is right there. ๐ธ
and that's the whole page!! mwah ๐ this was gnutls_aead_cipher_encryptv from the gnutls manual, version 3.8.13 โ go encrypt something responsibly, bestie, and remember the tag ๐โจ๐ฆ
๐ฆ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 ยท LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 ยท LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 ยท LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 ยท GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 ยท GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 ยท GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 ยท GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 ยท GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms