gsasl_base64_to(3)
π gsasl_base64_to(3) π
okay bestie, welcome to the gsasl manual, page for gsasl_base64_to. pull up a chair, grab a boba, we're encoding bytes today β¨
πΈ NAME πΈ
gsasl_base64_to β it's an API function, and it's lowkey iconic π
β¨ SYNOPSIS β¨
#include <gsasl.h>
int gsasl_base64_to(const char * in, size_t inlen, char ** out, size_t *
outlen);
like yes, one header, one function call, we love a minimal include π
π¦ ARGUMENTS π¦
const char * inβ your input byte array. the raw material. the moment before the glow-up πsize_t inlenβ how big that input byte array is. yes queen, we need the length π«Άchar ** outβ a pointer to a freshly allocated base64-encoded string. brand new, never worn, allocated just for you πsize_t * outlenβ a pointer to the size of that newly allocated base64-encoded string. the receipts, basically π§Ύ
π DESCRIPTION π
So what it does: it encodes data as base64. that's the whole vibe. π₯
The out string is zero terminated, and outlen holds the length excluding the terminating zero. so don't go counting the null byte as part of the party, bestie π
The out buffer must be deallocated by the caller. that's on you. it's giving "you break it, you bought it" β the function mallocs, you free. no cap π
Return value: it hands back GSASL_OK on success π β or GSASL_MALLOC_ERROR if the input was too large or memory allocation failed. (yes, the original says "memory allocation fail", we're keeping that exactly as-is, it's canon now π)
β οΈ quick vibe check: if you forget to freeout, that's a leak. the function will not do it for you. be the main character who callsfree()π
β SINCE β
0.2.2 β a classic. vintage. been here since way back π°οΈβ¨
π REPORTING BUGS π
found a bug? spill it, but like, to the right people π
- 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.
π 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/
and that's the whole page, bestie π«Ά go forth and encode responsibly. this was gsasl version 2.2.4, delivered straight from the gsasl_base64_to(3) manual page. mwah π
π¦ 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