gnutls_hpke_init(3)
β¨ gnutls_hpke_init β¨
okay bestie, so this one is from the gnutls manual β yes, that gnutls, the crypto library, and this page is literally called gnutls_hpke_init(3). It's the glow-up-your-HPKE-context function and I'm obsessed π
πΈ NAME πΈ
gnutls_hpke_init β API function
π SYNOPSIS π
#include <gnutls/hpke.h>
int gnutls_hpke_init(gnutls_hpke_context_t * ctx, gnutls_hpke_mode_t
mode, gnutls_hpke_role_t role, gnutls_hpke_kem_t kem, gnutls_hpke_kdf_t
kdf, gnutls_hpke_aead_t aead);
π¦ ARGUMENTS π¦
gnutls_hpke_context_t * ctxβ a pointer to the HPKE context you wanna initialize, bestie. that's the lil baby getting set up π«Άgnutls_hpke_mode_t modeβ the HPKE mode you're using. your options are Base, PSK, Auth, or AuthPSK πgnutls_hpke_role_t roleβ what role this context is playing: Sender or Receiver πgnutls_hpke_kem_t kemβ the KEM algorithm, likeDHKEM(X25519)for example π«gnutls_hpke_kdf_t kdfβ the KDF algorithm, e.g.HKDF-SHA256πgnutls_hpke_aead_t aeadβ the AEAD algorithm, e.g.AES-128-GCMπ₯
π DESCRIPTION π
So this function initializes the HPKE context with all those parameters you just handed it. It allocates memory for the context and sets the initial values for the fields based on what you passed in. it's giving setup era β¨
bestie listen. the context must be deinitialized using gnutls_hpke_deinit() once you don't need it anymore. that's how you free any allocated resources and securely erase sensitive information. not me being dramatic but this one actually matters ππ
β RETURNS β
0 on success, or a negative error code on failure. periodt.
π SINCE π
3.8.13 β she's new-ish, and she's iconic for it π
π REPORTING BUGS π
Found a bug? Don't gatekeep it, tell the devs:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π 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.
π 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/
and that's the whole vibe check, bestie π this page came to you straight from gnutls version 3.8.13, with gnutls_hpke_init(3) doing main character energy at the bottom of every page. slay, stay encrypted, and don't forget your gnutls_hpke_deinit() πβ¨π«Ά
π¦ 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