gnutls_hex_encode(3)
β¨ NAME β¨
gnutls_hex_encode β bestie, it's an API function π
πΈ SYNOPSIS πΈ
#include <gnutls/gnutls.h>
int gnutls_hex_encode(const gnutls_datum_t * data, char * result, size_t * result_size);
π ARGUMENTS π
const gnutls_datum_t * dataβ this is the raw data, the actual stuff, the un-encoded tea before it gets dressed up π«char * resultβ the spot where the hex data is gonna get copied. Your lil destination. The runway πsize_t * result_sizeβ this holds the size of the result, and yes it's a pointer, so it's both telling you the size and getting updated, main character energy tbh β¨
π¦ DESCRIPTION π¦
Okay so basically: this function takes the data you gave it and converts it into printable data using hex encoding, exactly the kind used in the PSK password files. No cap, that's the whole vibe π₯
Heads up bestie: the size of the result includes the null terminator. The \0 is part of the count. Don't forget them, or the vibe check will fail π
π RETURNS π
GNUTLS_E_SHORT_MEMORY_BUFFERβ when the buffer you handed over is not long enough. Not me giving it a tiny buffer... π0β on success! Slay, we ate π
π REPORTING BUGS π
Found a bug? Tell the people, they wanna know fr fr:
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π COPYRIGHT π
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.
(Translation: go off, copy it, 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/
And that's the whole page, bestie β this one lives in the gnutls manual, and it's from version 3.8.13 ππ Byeee, go hex-encode something iconic β¨π¦πΈ
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms