gnutls_hex_encode2(3)

✨ gnutls_hex_encode2(3) ✨

okay bestie, welcome to the gnutls manual, page for gnutls_hex_encode2 πŸ’– this one's a lil baby function but it's iconic in its own way, trust.


🌸 NAME 🌸

gnutls_hex_encode2 β€” it's an API function, periodt. that's the whole name, no crumbs.


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/gnutls.h>

int gnutls_hex_encode2(const gnutls_datum_t * data, gnutls_datum_t *
result);

look at her. two args, one int return. she's giving "small but mighty" energy ngl 🫢


πŸ’… ARGUMENTS πŸ’…

  • const gnutls_datum_t * data β€” this is the raw data, bestie. the actual bytes you wanna hex-ify. it's const, so like, hands off, we're just reading, no touchy πŸ™ˆ
  • gnutls_datum_t * result β€” this is where the glow-up lands: the result, in an allocated string. note the asterisk, she's a pointer, she gets filled in for you ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does she DO? she takes the data you handed her and converts it to printable data using the hex encoding β€” the exact same hex encoding used in the PSK password files. iykyk πŸ”₯

⚠️ important lil caveat, no cap: the size of the result does NOT include the null terminator. so don't go counting that \0 in your length math, she's not in the club πŸ’€

⭐ RETURNS ⭐

GNUTLS_E_SUCCESS on success, bestie!! πŸŽ‰ and otherwise... a negative error code 😭 so like, if you see a negative number, something went wrong and you should go check your vibe (and your inputs). the way that error handling is literally mandatory here β€” do not skip it fr fr.


πŸ‘‘ REPORTING BUGS πŸ‘‘

found a bug? spill the tea, but like, officially:


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. (yes queen, free as in freedom, we love to see 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/

like, go read the whole thing, it's giving encyclopedia but make it slay πŸ“šβœ¨


and that's the page, bestie!! this manual page came to you from gnutls, version 3.8.13, and this absolute icon of a function, gnutls_hex_encode2(3). mwah πŸ’‹ go hex-encode something and stay hydrated πŸ“πŸ¦‹

πŸ“¦ where this page comes from