gnutls_random_art(3)

✨ gnutls_random_art(3) ✨

okay bestie, so this one lives in the gnutls manual, and it's genuinely one of the cutest things in the whole library ngl πŸ’–


🌸 NAME 🌸

gnutls_random_art β€” API function

like... it makes art. from a fingerprint. no cap 🎨


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/gnutls.h>

int gnutls_random_art(gnutls_random_art_t type, const char * key_type,
unsigned int key_size, void * fpr, size_t fpr_size, gnutls_datum_t *
art);

πŸ’… ARGUMENTS πŸ’…

  • gnutls_random_art_t type β€” the vibe of the random art you want. rn the only one that's supported is GNUTLS_RANDOM_ART_OPENSSH, so that's the one, periodt ✨
  • const char * key_type β€” what kind of key we're working with (RSA, DSA, etc.) πŸ”‘
  • unsigned int key_size β€” how big the key is, measured in bits
  • void * fpr β€” the fingerprint of the key itself
  • size_t fpr_size β€” how big that fingerprint is
  • gnutls_datum_t * art β€” the random art that comes back out πŸŽ€

🌈 DESCRIPTION 🌈

so the whole ~thing~ here: this function takes a fingerprint you hand it and converts it into an "artistic" image. iconic behaviour honestly 🫢

and important detail bestie: the returned image is allocated using gnutls_malloc(), and it is null-terminated β€” but art->size will not count that terminating null. so don't let that trip you up, iykyk πŸ’€


⭐ RETURNS ⭐

if everything goes off without a hitch you get GNUTLS_E_SUCCESS (which is 0), and if not, you get an error code back. slay either way πŸ’–


πŸ› REPORTING BUGS πŸ›

found a bug? tell the girlies at <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. so like, go off, 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/


okay that's the whole page bestie, every last flag and fact, no notes πŸ’…

and that's a wrap on the gnutls manual, version 3.8.13 β€” mwah, go make some random art, you absolute icon πŸŽ€βœ¨πŸ’œ

πŸ“¦ where this page comes from