gsasl_stringprep_saslprep(3)

πŸ“¦ version 1.10.0, in ubuntu jammy

πŸ’– NAME πŸ’–

okay bestie, gather round β€” gsasl_stringprep_saslprep is the function name, and it's an API function from the gsasl manual, section 3. That's the whole vibe check for the title, no cap.


✨ SYNOPSIS ✨

like, here's the summoning circle you gotta write first:

#include <gsasl.h>

char * gsasl_stringprep_saslprep(const char * in, int * stringprep_rc);

that's it. that's the whole signature. she's giving "small but mighty" 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • const char * in β€” this is the input, bestie. an ASCII or UTF-8 string holding the data you wanna prepare according to SASLprep. it just sits there, being a string, minding its business.
  • int * stringprep_rc β€” a pointer to an output variable that'll get stuffed with the stringprep error code. or you can pass NULL if you literally do not care about it. your call, main character. πŸ’…

🌸 DESCRIPTION 🌸

so what does she do? she processes a Unicode string for comparison, following the "SASLprep" stringprep profile. that's the whole job. iconic behavior.

the intended audience here is Simple Authentication and Security Layer (SASL) mechanisms β€” think PLAIN, CRAM-MD5, and DIGEST-MD5, those legends β€” plus any other protocol out there swapping user names and/or passwords around. iykyk. πŸ¦‹

Return value, listen up: she hands you back a newly allocated string that is the "SASLprep" processed form of the input string. but if something goes wrong? she returns NULL, and in that case stringprep_rc holds the stringprep library error code. so like, that second arg is not decorative, bestie. 😭


πŸ’€ DEPRECATED πŸ’€

not me being the bearer of bad news but… this one is deprecated. use gsasl_saslprep() instead. periodt. the old girl still works (presumably) but she's been gently asked to step aside. πŸ™ˆ

πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't just scream into the group chat, actually report it:


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.

(that's the legal bit, and honestly? very generous of them. slay. πŸ’œ)


🌈 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_stringprep_saslprep(3) β€” go forth and stringprep responsibly, mwah πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from