gsasl_encode(3)

✨ gsasl_encode ✨

okay bestie, welcome to the gsasl manual πŸ’– this one's gsasl_encode(3), and it's literally the glow-up your data gets before it goes out into the world. buckle up πŸŽ€


πŸ’… NAME

gsasl_encode β€” it's an API function, bestie. that's the whole vibe.


πŸ¦‹ SYNOPSIS

#include <gsasl.h>

int gsasl_encode(Gsasl_session * sctx, const char * input, size_t
input_len, char ** output, size_t * output_len);

🌸 ARGUMENTS

  • Gsasl_session * sctx β€” your libgsasl session handle. the main character of this whole operation, fr fr.
  • const char * input β€” the input byte array. the raw material πŸ“
  • size_t input_len β€” how big that input byte array is. gotta know the size.
  • char ** output β€” a newly allocated output byte array. it didn't exist before, and now it does ✨
  • size_t * output_len β€” a pointer to the output variable holding the size of that output byte array. yes, it's a pointer to a size. it's giving layers πŸ‘‘

πŸ’– DESCRIPTION

so what this does is encode data according to the negotiated SASL mechanism. and depending on which mechanism you negotiated, that might mean your data is integrity protected or privacy protected β€” either way, it's protected, periodt πŸ”₯

the output buffer? this function allocates it. and it is 100% your responsibility as the caller to deallocate it by calling gsasl_free( output ). no cap, if you don't free it, that's on you πŸ’€

Return value: returns GSASL_OK if the encoding was successful πŸŽ‰ otherwise you get an error code. it's giving "we don't always win" 😭

πŸ™ˆ REPORTING BUGS

found a bug? tell the girlies at <bug-gsasl@gnu.org> 🫢

general guidelines for reporting bugs live at: https://www.gnu.org/gethelp/

and the GNU SASL home page is right here: https://www.gnu.org/software/gsasl/


Copyright Β© 2002-2026 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. slay, honestly β€” that's a very generous license πŸŽ€


🌈 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, this command:

info gsasl

should give you access to the complete manual. iykyk ✨

as an alternative, you may obtain the manual from:

https://www.gnu.org/software/libidn/gsasl/manual/

and that's the whole page, bestie πŸ¦‹ this was gsasl_encode(3) from gsasl 2.2.4, brought to you by the gsasl girlies. stay encoded, stay freed πŸ’œπŸ§šβ­

πŸ“¦ where this page comes from