gnutls_base64_encode2(3)
β¨ gnutls_base64_encode2(3) β¨
okay bestie, sit down, hydrate, and let me tell you about a lil function from the gnutls manual β yes it's a manual page, yes it's giving library-docs energy, but this one is lowkey cute because it's just "turn my bytes into base64, please." π
πΈ NAME πΈ
gnutls_base64_encode2 β it's an API function, and its whole personality is encoding your raw data into printable base64 text π
π¦ SYNOPSIS π¦
#include <gnutls/gnutls.h>
int gnutls_base64_encode2(const gnutls_datum_t * data, gnutls_datum_t *
result);
β¨ ARGUMENTS β¨
const gnutls_datum_t * dataβ this is your raw data, the un-encoded vibes, the actual bytes before the glow-up π«Άgnutls_datum_t * resultβ this is where the newly allocated encoded data ends up. brand new memory, freshly allocated, main character energy β¨
π DESCRIPTION π
So the way that this works is: this function converts the data you gave it into printable data using base64 encoding π. It will allocate the required memory to hold the encoded data β like, it goes and gets the memory for you, no cap.
bestie, listen: you should use gnutls_free() to free the returned data. do not just leave it there. free your girl. π§
β RETURNS β
On success, GNUTLS_E_SUCCESS (0) is returned. Otherwise, an error code is returned. that's it, that's the deal π
π SINCE π
3.6.0 β so she's been iconic for a minute π
π REPORTING BUGS π
Found a bug? Tell the gnutls girlies about it:
- 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. (so like, go off, 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 came to you straight from the gnutls manual, version 3.8.13, dated gnutls_base64_encode2(3) β mwah, go forth and encode responsibly β¨ππ¦
π¦ 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