gnutls_privkey_export_dh_raw(3)

✨ gnutls_privkey_export_dh_raw ✨

okay bestie, so this one lives in the gnutls manual (section 3, the library-calls girlies) and it's literally all about pulling the Diffie-Hellman private key parameter out of a gnutls_privkey_t. no cap, it's a whole vibe πŸ’…


πŸŽ€ NAME πŸŽ€

gnutls_privkey_export_dh_raw β€” API function


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/abstract.h>

int gnutls_privkey_export_dh_raw(gnutls_privkey_t key,
gnutls_dh_params_t params, gnutls_datum_t * y, gnutls_datum_t * x,
unsigned int flags);

🌸 ARGUMENTS 🌸

  • gnutls_privkey_t key β€” holds the private key, she's the main character here πŸ‘‘
  • gnutls_dh_params_t params β€” will hold the Diffie-Hellman parameters. it's optional (so you can pass nothing if you're not about that life), but if you do pass it, it must be initialized. don't come in here uninitialized fr fr πŸ™ˆ
  • gnutls_datum_t * y β€” will hold the y. also optional. lowkey just chilling ✨
  • gnutls_datum_t * x β€” will hold the x. this one's not optional, bestie, she's required πŸ’–
  • unsigned int flags β€” flags from gnutls_abstract_export_flags_t

πŸ’œ DESCRIPTION πŸ’œ

so this function will export the Diffie-Hellman private key parameter found in the given gnutls_privkey_t structure. the new parameter gets allocated using gnutls_malloc() and gets stored in the appropriate datum. yes, allocated, as in you are responsible for it, iykyk 🫢

and if you want the other parameters that are common in both the public key and the private key? use gnutls_dh_params_export_raw() instead. different function, different slay 🌈


⭐ RETURNS ⭐

GNUTLS_E_SUCCESS on success β€” we love a happy ending πŸ’– β€” otherwise a negative error code. sad girl hours 😭


🧚 SINCE 🧚

3.8.2


πŸ”₯ REPORTING BUGS πŸ”₯

report bugs to <bugs@gnutls.org>. home page: https://www.gnutls.org


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. 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/

that's the whole thing, bestie β€” no notes, you ate πŸŽ€ this was gnutls version 3.8.13, page gnutls_privkey_export_dh_raw(3), from the gnutls manual. go forth and export those params πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from