gsasl_saslprep(3)

✨ gsasl_saslprep(3) β€” the gsasl manual, bestie edition ✨

okay so this is a page from the gsasl manual, and today we're talking about gsasl_saslprep β€” she's a function, she's iconic, she preps your strings for you πŸ’…


🌸 NAME 🌸

gsasl_saslprep β€” bestie, this is an API function. that's the whole name. short, sweet, does what it says πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gsasl.h>

int gsasl_saslprep(const char * in, Gsasl_saslprep_flags flags, char **
out, int * stringpreprc);

like… she's right there. three args and a return type. no cap πŸ’–


πŸ’œ ARGUMENTS πŸ’œ

  • const char * in β€” a UTF-8 encoded string. that's the thing you're feeding her, and yes it has to be UTF-8, she's not doing charsets today πŸ™ˆ
  • Gsasl_saslprep_flags flags β€” any SASLprep flag you want, e.g. GSASL_ALLOW_UNASSIGNED. so you get to pick the vibe ✨
  • char ** out β€” on exit, this holds a newly allocated output string. note the "newly allocated" part, we'll come back to it, it's giving "you own this now" 😭
  • int * stringpreprc β€” if this is non-NULL, it'll hold the precise stringprep return code. like the receipts of why it went the way it went 🧾

πŸ‘‘ DESCRIPTION πŸ‘‘

Prepare string using SASLprep. that's the mission, that's the whole assignment 🫢

On success, the out variable must be deallocated by the caller. yes queen, that's on you. she allocates, you free. that's the deal, periodt πŸ’€

Return value: Returns GSASL_OK on success, or GSASL_SASLPREP_ERROR on error. two options, no in-between, she's decisive like that ⭐

⭐ SINCE ⭐

0.2.3 β€” she's been here since 0.2.3, an OG, main character energy fr fr πŸ‘‘


πŸ“ REPORTING BUGS πŸ“

found a bug? don't just scream into the void, bestie, tell the people who can fix it:


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. so like… share it, remix it, whatever, just keep the receipts intact πŸ’–


🌈 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:

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

go forth and read the docs, it's self-care 🧚


that's the whole page, bestie πŸ’œ this was gsasl_saslprep(3) from the gsasl manual, version 2.2.4 β€” go prep those strings, slay, and remember to free() your out or you'll be leaking in the group chat 😭✨

πŸ“¦ where this page comes from