gsasl_hex_from(3)
β¨ gsasl_hex_from(3) β the gsasl manual, but make it cute β¨
okay bestie, gather round, because today we're decoding some hex π₯ this one lives in the gsasl manual (that's the manual name, for the record), and it's literally just one little function that turns hex text back into real bytes. tiny function, big slay π
π NAME π
gsasl_hex_from β an API function. yes that's it. that's the whole name section. iconique brevity β¨
πΈ SYNOPSIS πΈ
#include <gsasl.h>
int gsasl_hex_from(const char * in, char ** out, size_t * outlen);
there she is π«Ά three args, one int return, no drama.
π ARGUMENTS π
const char * inβ the input byte array. this is the hex-encoded stuff you're bringing to the party πchar ** outβ a pointer to a newly allocated output byte array. note the words "newly allocated", bestie, because that means it's yours to deal with later π«£size_t * outlenβ a pointer to the size of that newly allocated output byte array. so it tells you how big the thing it just made for you actually is π
π¦ DESCRIPTION π¦
so basically: this decodes hex data. that's the vibe check, it passed β
the <red>out` buffer must be deallocated by the caller β like, that's on you, not on the function. the function makes it, you free it. no cap, don't leak it π
and here's the return value tea, in order:
- returns
GSASL_OKon success π - returns
GSASL_BASE64_ERRORif the input was invalid π (yes, the hex function returns a base64 error constant, and no, i don't make the rules, i just report them) - returns
GSASL_MALLOC_ERRORon memory allocation errors π
π SINCE π
1.10 β so it's been around a minute, certified classic π
π REPORTING BUGS π
found a bug? not me being the bug reporter but ok, here's where to go:
- report bugs to <bug-gsasl@gnu.org> π§
- general guidelines for reporting bugs: https://www.gnu.org/gethelp/
- GNU SASL home page: https://www.gnu.org/software/gsasl/
π COPYRIGHT π
Copyright Β© 2002-2026 Simon Josefsson.
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. free as in freedom, periodt ποΈ
π§ SEE ALSO π§
the full documentation for gsasl is maintained as a Texinfo manual. if the info and gsasl programs are properly installed at your site, the command
info gsasl
should give you access to the complete manual. as an alternative you may obtain the manual from:
https://www.gnu.org/software/libidn/gsasl/manual/
iykyk π
and that's the whole page, bestie!! this was gsasl version 2.2.4 in the gsasl manual, page gsasl_hex_from(3), and honestly? decoding hex has never felt more main character π
β¨ slay responsibly and free your buffers ππ¦π
π¦ where this page comes from
- arch rolling: gsasl 2.2.4-1 Β· LGPL-2.1-or-later AND GPL-3.0-or-later AND GFDL-1.3-or-later
- ubuntu stonking: libgsasl-dev 2.2.4-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms