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:


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