gnutls_srp_base64_encode2(3)

πŸ’– gnutls_srp_base64_encode2 β€” bestie edition πŸ’–

okay so this is a page from the gnutls manual (section 3, the library-functions girlypops 🫢), and today's main character is gnutls_srp_base64_encode2. she's an API function. that's it, that's the name section. slay. ✨


✨ SYNOPSIS ✨

like, the whole vibe, fr:

#include <gnutls/gnutls.h>

int gnutls_srp_base64_encode2(const gnutls_datum_t * data, gnutls_datum_t * result);

πŸŽ€ ARGUMENTS πŸŽ€

  • const gnutls_datum_t * data β€” this is the raw data you're handing over. the un-encoded, un-glammed, still-in-sweats version πŸ’…
  • gnutls_datum_t * result β€” and this one? this is where the newly allocated encoded data is gonna live. she gets a whole new outfit, and the memory for it gets allocated for her. no cap. πŸ‘‘

🌸 DESCRIPTION 🌸

so what does she actually do. she takes the data you gave her and converts it to printable data using base64 encoding. ✨

and listen β€” this specific base64 is the encoding used in SRP password files. that's her whole lane. that's her niche. she's not a general-purpose girlie, she's the SRP password file girlie. iykyk.

she will allocate the required memory to hold the encoded data, so you don't have to do it yourself. generous icon behavior honestly 😭

IMPORTANT, bestie, pls read: you should use gnutls_free() to free the returned data. don't just leave her hanging, okay? clean up after yourself. 🧹
WARNING!! 🚨 this base64 encoding is not the "standard" encoding. do NOT use it for non-SRP purposes. like, at all. she is not that girl for your random base64 needs, and trying to make her be will go badly. periodt. πŸ’€

πŸ¦‹ RETURNS πŸ¦‹

  • 0 on success πŸŽ‰
  • or an error code 😭

that's it. simple. elegant. main character energy.


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? spill it to <bugs@gnutls.org>. they wanna know, fr fr.

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/

okay that's the whole page, you ate that, go forth and encode responsibly ✨ this was the gnutls manual, version 3.8.13, page gnutls_srp_base64_encode2(3). mwah πŸ’‹ πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from