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, like DHKEM(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:


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