gnutls_hex_decode2(3)

πŸ’– gnutls_hex_decode2(3) πŸ’–

okay bestie, welcome to the gnutls manual β€” this one's a little function page and it's honestly so useful. sit with me for a sec 🫢


✨ NAME ✨

gnutls_hex_decode2 β€” it's an API function, and its whole job is turning hex back into actual bytes. the glow-up from hex to raw data, if you will πŸ’…


🌈 SYNOPSIS 🌈

#include <gnutls/gnutls.h>

int gnutls_hex_decode2(const gnutls_datum_t * hex_data, gnutls_datum_t *
result);

like, that's it. two args, one int coming back at you. no cap. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • const gnutls_datum_t * hex_data β€” this is the encoded data, i.e. the hex string situation you're handing over. it's const, so don't even think about touching it, she's read-only πŸ’…
  • gnutls_datum_t * result β€” and this is where the decoded output lands, in an allocated string. it's giving "here's your present, it's been malloc'd" 🎁

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically: this function decodes the encoded data you give it, using the hex encoding used by PSK password files. that's the specific flavour of hex we're talking about here, not just any hex-adjacent vibe. it decodes, it fills in your result, and it moves on with its life. iconic behaviour, truly. ✨


πŸ‘‘ RETURNS πŸ‘‘

  • GNUTLS_E_PARSING_ERROR β€” this is what you get when the hex data is invalid. the vibe check failed. πŸ’€
  • 0 β€” success, babe. we ate. πŸ”₯

πŸ’œ REPORTING BUGS πŸ’œ

found something cursed? spill it to <bugs@gnutls.org> β€” they wanna know, fr fr.

home page is right here: https://www.gnutls.org


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

and the license tea: copying and distribution of this file, with or without modification, are permitted in any medium without royalty, as long as you keep the copyright notice and this notice intact. so like, use it, remix it, whatever β€” just don't erase the credits, that's the rule, periodt. 🫢


⭐ SEE ALSO ⭐

the full documentation for gnutls lives in a Texinfo manual (very thorough of them, honestly).

if the /usr/share/doc/gnutls/ directory does not contain the HTML form, then go visit:

https://www.gnutls.org/manual/


and that's the whole page, bestie πŸ’– this came to you from the gnutls manual, version 3.8.13, and yeah it's stamped gnutls_hex_decode2(3) at the bottom β€” go decode something cute, mwah πŸŽ€βœ¨πŸŒˆ

πŸ“¦ where this page comes from