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
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
- arch rolling: gsasl 2.2.4-1 Β· LGPL-2.1-or-later AND GPL-3.0-or-later AND GFDL-1.3-or-later
- ubuntu stonking: libgsasl-dev 2.2.4-1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms