gsasl_base64_encode(3)

πŸ“¦ version 1.10.0, in ubuntu jammy

πŸ’– gsasl_base64_encode β€” the manual page, but make it a group chat

okay so bestie, we're in the gsasl manual, page gsasl_base64_encode(3), and I need you to know right now that this function is lowkey retired but we're still gonna learn her because she ate πŸ’…


✨ NAME ✨

gsasl_base64_encode β€” an API function, bestie. that's it, that's the name πŸŽ€


🌸 SYNOPSIS 🌸

#include <gsasl.h>

int gsasl_base64_encode(char const * src, size_t srclength, char *
target, size_t targsize);

look at her. four arguments. no notes. copy it exactly, i'm watching πŸ‘€


πŸ¦‹ ARGUMENTS πŸ¦‹

  • char const * src β€” your input byte array, the raw material, the moment before the glow-up πŸ’–
  • size_t srclength β€” how big that input byte array is, fr fr. gotta know what you're working with.
  • char * target β€” the output byte array, aka where the base64 magic gets dropped ✨
  • size_t targsize β€” the size of that output byte array. know your limits, queen.

πŸ‘‘ DESCRIPTION πŸ‘‘

Encode data as base64. it's giving glow-up for bytes 🌈

here's the vibe: it converts characters, three at a time, starting at src, into four base64 characters in the target area, and it keeps going until the entire input buffer is encoded. three in, four out, three in, four out, on repeat until there's nothing left. it's a little assembly line and it is iconic πŸŽ€

Return value: returns the number of data bytes stored at the target, or -1 on error. so like, count your wins when you win, and -1 means something went wrong, no cap 😭


πŸ’€ DEPRECATED πŸ’€

bestie. she's deprecated. this is not a drill. use gsasl_base64_to() instead. i'm not being dramatic, the manpage literally says so πŸ’…

πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? not the cute kind? report it, king 🫢


Copyright Β© 2002-2021 Simon Josefsson.

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.

(translation: take it, share it, remix it, just keep the receipts 🧾✨)


🌈 SEE ALSO 🌈

The full documentation for gsasl is maintained as a Texinfo manual. If the info and gsasl programs are properly installed at your site, the command

info gsasl

should give you access to the complete manual. As an alternative you may obtain the manual from:

http://www.gnu.org/software/gsasl/manual/

and that's the whole page, bestie πŸ’œ this was gsasl version 1.10.0, page gsasl_base64_encode(3), brought to you by the fine folks maintaining this manual. go forth, encode responsibly, and remember: use gsasl_base64_to() instead πŸ˜˜πŸŽ€πŸ’…

πŸ“¦ where this page comes from