gnutls_srp_base64_decode(3)

πŸ’– gnutls_srp_base64_decode β€” the manual page, bestie edition πŸ’–

okay so this is part of the gnutls manual, and today's main character is a little function called gnutls_srp_base64_decode. yes, it's an API function. and yes, it's giving very niche, very specific, very iykyk energy. let's get into it 🫢


✨ NAME ✨

gnutls_srp_base64_decode β€” an API function, and she does exactly one thing: decode πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

int gnutls_srp_base64_decode(const gnutls_datum_t * b64_data, char *
result, size_t * result_size);

look at her. three args, one int, no drama. slay πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • const gnutls_datum_t * b64_data β€” this is the encoded data, the thing you're feeding in. she's holding the encoded stuff, respectfully.
  • char * result β€” the spot where the decoded data is gonna get copied. like, this is the destination, bestie. make room.
  • size_t * result_size β€” this one holds the size of the result. she's the one keeping count, and yes she matters, don't sleep on her.

πŸ’œ DESCRIPTION πŸ’œ

so basically, this function decodes the encoded data you hand it, and it does it using the base64 encoding found in libsrp. that's the specific flavor of base64 we're working with here β€” not just any base64, the libsrp one.

heads up: b64_data should be null terminated. no cap. if it isn't, that's on you, and she will not be happy.
⚠️ WARNING!! ⚠️ this base64 encoding is NOT the "standard" encoding. like, at all. so do not use it for non-SRP purposes. i'm so serious. this is not the moment to be creative. keep it in the SRP lane, periodt πŸ’€

⭐ RETURNS ⭐

  • GNUTLS_E_SHORT_MEMORY_BUFFER β€” if the buffer you gave her is not long enough 😭 (she tried, the buffer just wasn't built for this)
  • 0 β€” on success ✨ iconic behavior

🌈 REPORTING BUGS 🌈

found a bug? don't just scream into the void, report it to <bugs@gnutls.org>. they wanna know fr fr.

Home page: https://www.gnutls.org β€” go say hi 🏠


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, copy it, share it, remix it β€” just keep the receipts, bestie 🫢


πŸŽ€ SEE ALSO πŸŽ€

The full documentation for gnutls is maintained as a Texinfo manual. and if the /usr/share/doc/gnutls/ directory does not contain the HTML form, then go visit:

https://www.gnutls.org/manual/

that's the one. that's the link. go read. πŸ“šβœ¨


and that's the whole page, no crumbs left. this was gnutls 3.8.13, and it's the gnutls_srp_base64_decode(3) manual page, out. mwah πŸ’‹ stay decoded, stay null terminated, and don't use this encoding for non-SRP stuff, i'm begging πŸ§šπŸ’–

πŸ“¦ where this page comes from