gnutls_base64_decode2(3)

πŸ’– gnutls_base64_decode2(3) πŸ’–

okay bestie, welcome to the gnutls manual, we're decoding base64 today and honestly? it's giving glow-up. this page is for gnutls_base64_decode2, and it's lowkey one of the most useful little functions in the whole library. no cap. πŸŽ€


✨ NAME ✨

gnutls_base64_decode2 β€” it's an API function, and its whole job is taking your base64-encoded selfie... i mean data... and turning it back into the real thing πŸ¦‹


✨ SYNOPSIS ✨

okay so first you gotta bring the header into the group chat:

#include <gnutls/gnutls.h>

and then the function itself, iconic as always:

int gnutls_base64_decode2(const gnutls_datum_t * base64, gnutls_datum_t
* result);

✨ ARGUMENTS ✨

  • const gnutls_datum_t * base64 β€” bestie this one contains the encoded data. like, the scrambled-up base64 version. it's the one holding the mystery πŸ•΅οΈβ™€οΈ
  • gnutls_datum_t * result β€” and this one is the location of decoded data. that's where the real, decoded thing gets dropped. main character energy fr πŸ’…

✨ DESCRIPTION ✨

so here's the tea β˜• β€” this function will decode the given base64 encoded data. the decoded data gets allocated, and then stored into result. it's basically the function doing all the work for you and handing you the finished product. obsessed. 😭

🚨 IMPORTANT BESTIE: you should use gnutls_free() to free the returned data. do NOT forget. the way that memory leaks are literally not the vibe. free your data, periodt. πŸ’€

✨ RETURNS ✨

on success, GNUTLS_E_SUCCESS (which is 0, btw) is returned 🌟 otherwise? an error code comes back instead. so like, check your return values, bestie, that's the whole point πŸ™ˆ


✨ SINCE ✨

3.6.0 β€” she's been here since 3.6.0, a true veteran πŸ‘‘


✨ REPORTING BUGS ✨

found a bug? don't be shy, tell the devs πŸ›


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, share it, remix 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/

go read it, it's giving educated πŸ’œ


and that's the whole page, bestie!! 🌸 this was gnutls manual, version 3.8.13, page gnutls_base64_decode2(3) β€” decode responsibly, free your memory, and slay βœ¨πŸ’…πŸŒˆ

πŸ“¦ where this page comes from