gnutls_key_generate(3)

✨ gnutls_key_generate(3) ✨

okay bestie, welcome to the gnutls manual πŸ’– this one's a tiny lil function page but it's lowkey iconic β€” it's the one that makes you a random key out of thin air. no cap.


πŸŽ€ NAME πŸŽ€

gnutls_key_generate β€” literally just the API function that does the thing, iykyk


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_key_generate(gnutls_datum_t * key, unsigned int key_size);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_datum_t * key β€” bestie, this is a pointer to a gnutls_datum_t, and after this call it's gonna be holding a freshly created key ✨ like it comes out of the function already glowing, main character energy.
  • unsigned int key_size β€” the number of bytes of the key 🫢 so you tell it how chunky you want your key and it respects that.

πŸ’œ DESCRIPTION πŸ’œ

Generates a random key of key_size bytes. that's it. that's the whole vibe. πŸ’…


πŸ‘‘ RETURNS πŸ‘‘

On success, GNUTLS_E_SUCCESS (0) is returned 😌 or an error code. (not the success era, we don't do that here β€” if you get a nonzero, something's off.)


🌈 SINCE 🌈

3.0 β€” so this has been serving since way back, a true veteran of the gnutls world ⭐


πŸ’€ REPORTING BUGS πŸ’€

Found a bug? don't suffer in silence bestie 😭 report it 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. (fr fr, that's the license, respect it 🫑)


🧚 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 page, bestie πŸ’– this was the gnutls manual, version 3.8.13, page gnutls_key_generate(3) β€” thanks for reading, you ate that πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from