gnutls_pem_base64_decode(3)

πŸ’– gnutls_pem_base64_decode(3) πŸ’–

okay bestie, welcome to the gnutls manual, page for gnutls_pem_base64_decode β€” it's an API function and it's literally here to un-scramble your PEM data. this is from the gnutls 3.8.13 docs, so you know it's fresh. let's get into it 🫢


✨ NAME ✨

gnutls_pem_base64_decode β€” API function


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_pem_base64_decode(const char * header, const gnutls_datum_t *
b64_data, unsigned char * result, size_t * result_size);

πŸŽ€ ARGUMENTS πŸŽ€

  • const char * header β€” a null terminated string holding the PEM header, like, for example CERTIFICATE. yes it's literally the word that goes in the header, no cap.
  • const gnutls_datum_t * b64_data β€” this is where the encoded data lives. the vibe-coded blob goes here πŸ’…
  • unsigned char * result β€” the spot where the decoded data gets copied. this is your output destination, main character energy ✨
  • size_t * result_size β€” holds the size of the result. it's giving "how much room do we have / how much did we use" 😭

πŸ¦‹ DESCRIPTION πŸ¦‹

so this function will decode the given encoded data. that's the whole job, and it ate.

if the header you pass in is non NULL, this function will search for "-----BEGIN header" and decode only that part. otherwise β€” meaning if you gave it a NULL header β€” it will decode the first PEM packet found. periodt.


🌈 RETURNS 🌈

on success, GNUTLS_E_SUCCESS (0) is returned. and if the buffer you gave is not long enough, GNUTLS_E_SHORT_MEMORY_BUFFER is returned. or, you know, 0 on success. yes bestie, the manpage said success twice, and honestly? iconic. we respect the repetition πŸ’€


πŸ› REPORTING BUGS πŸ›

found a bug? spill it to <bugs@gnutls.org>.

home page: https://www.gnutls.org


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 β€” no skips, no cuts, every single detail kept 🫢✨ this was gnutls 3.8.13, page gnutls_pem_base64_decode(3), from the gnutls manual. go decode something cute πŸ’–πŸŒΈπŸŽ€

πŸ“¦ where this page comes from