gnutls_srp_base64_encode(3)
π gnutls_srp_base64_encode(3) β the gnutls manual, section 3 π
okay bestie, sit down, we're learning a gnutls API function today and honestly? it's a lil niche but it's iconic. this one's called gnutls_srp_base64_encode, and it lives in the gnutls manual (section 3, the library-calls girlies, iykyk). let's get into it β¨
πΈ NAME πΈ
gnutls_srp_base64_encode β it's an API function, bestie. that's the whole vibe.
β¨ SYNOPSIS β¨
#include <gnutls/gnutls.h>
int gnutls_srp_base64_encode(const gnutls_datum_t * data, char * result,
size_t * result_size);
there she is π«Ά look at her go.
π ARGUMENTS π
const gnutls_datum_t * dataβ this is where the raw data lives. the unencoded, unhinged, straight-out-the-gate bytes. πchar * resultβ the spot where the base64 data is gonna get copied into. like, this is the destination, the main character slot, the place it all goes down. π¦size_t * result_sizeβ this one holds the size of the result. it's the little number-keeper. it knows things. π
π DESCRIPTION π
so what does this function do? it takes the data you hand it and converts it into printable data using base64 encoding β specifically, the base64 encoding as used in the libsrp. π
and like, this is the encoding used in SRP password files. that's her whole purpose. that's her lane. no cap.
but β and this is the part where you gotta pay attention β if the buffer you gave her is not long enough, she's gonna hit you with GNUTLS_E_SHORT_MEMORY_BUFFER and return it right back at you. so like, size your buffer properly, bestie, or she WILL let you know. π
β οΈ Warning! This base64 encoding is not the "standard" encoding. do not use it for non-SRP purposes. like, i'm so serious, do not take this girl to a standard-base64 party, she does not belong there. π use the normal base64 for normal things. this one is SRP-only, periodt.
π₯ RETURNS π₯
GNUTLS_E_SHORT_MEMORY_BUFFERβ she's throwing this at you if the buffer you gave is not long enough. sad. tragic. fix your buffer. π0β success, bestie!! we ate!! π
π REPORTING BUGS π
found a bug? don't be shy, report it to <bugs@gnutls.org>. they wanna hear it, fr fr. π
Home page: https://www.gnutls.org
π 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, go off, but 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 lil manual page came to you straight from gnutls, version 3.8.13, and yes, the title up top said gnutls_srp_base64_encode(3) the whole time. slay, go encode some SRP passwords responsibly, and remember: NOT standard base64!! πβ¨π
π¦ 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