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 π
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
- 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