gnutls_aead_cipher_init(3)

πŸ’– gnutls_aead_cipher_init(3) πŸ’–

okay bestie, welcome to the gnutls manual β€” yes, the gnutls, the manual page name is literally gnutls β€” and today we're decoding gnutls_aead_cipher_init, which is an API function. it's giving ✨cryptography✨, it's giving main character energy, and it's honestly not even that deep. let's go πŸ¦‹


🌸 NAME 🌸

gnutls_aead_cipher_init β€” API function

no cap, that's the whole name. short. iconic. periodt πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/crypto.h>

int gnutls_aead_cipher_init(gnutls_aead_cipher_hd_t * handle,
       gnutls_cipher_algorithm_t cipher, const gnutls_datum_t * key);

like yes, you do need #include <gnutls/crypto.h>, we don't make the rules (we do, actually, but still) πŸŽ€


🫢 ARGUMENTS 🫢

  • gnutls_aead_cipher_hd_t * handle β€” bestie this is a gnutls_aead_cipher_hd_t type. that's it. that's the whole description. it's the handle, it's your little crypto container, you're gonna hand it over and it comes back all initialized πŸ’œ
  • gnutls_cipher_algorithm_t cipher β€” the authenticated-encryption algorithm you wanna use. pick your fave, we don't judge 🌈
  • const gnutls_datum_t * key β€” the key to be used for encryption πŸ”‘ keep it secret, keep it safe, don't put it in the group chat

πŸ’« DESCRIPTION πŸ’«

so this function will initialize a context that you can use for encryption/decryption of data. that's the vibe. encryption AND decryption, one context, dual threat, we love a multitasker 😭✨

and here's the cute part: this will effectively use the current crypto backend in use by gnutls, or the cryptographic accelerator in use. so whichever one is doing the heavy lifting in your setup β€” that's who's showing up. you don't have to pick. it just knows. iykyk πŸ”₯


🌟 RETURNS 🌟

Zero on success, or a negative error code on error. so like, if you get something < 0, that's your sign bestie, check it 🚨


πŸŽ€ SINCE πŸŽ€

3.4.0 β€” she's been here since 3.4.0, an OG, a legend, a queen πŸ‘‘


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me manifesting that, but if you did:

we're nice, we promise, just tell us what happened πŸ™ˆ


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.

translation: use it, share it, just keep the receipts 🧚


🌈 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 are ghosting you, the website never will πŸ¦‹


and that's the whole page, bestie!! no notes, ate, left zero crumbs. this little love letter came to you from gnutls version 3.8.13, and yeah the header says gnutls_aead_cipher_init(3) and the footer says gnutls_aead_cipher_init(3) too, because symmetry is hot πŸ’… stay encrypted, stay hydrated, mwah πŸ«ΆπŸ’–

πŸ“¦ where this page comes from