gsasl_scram_secrets_from_password(3)
π NAME
gsasl_scram_secrets_from_password β it's an API function, bestie, and it's literally the one that turns your password into all the SCRAM secrets you need π
It lives in the gsasl manual, section 3 (that's the library-functions girlies), so if you see gsasl_scram_secrets_from_password(3) floating around, that's her π
β¨ SYNOPSIS
#include <gsasl.h>
int gsasl_scram_secrets_from_password(Gsasl_hash hash, const char *
password, unsigned int iteration_count, const char * salt, size_t
saltlen, char * salted_password, char * client_key, char * server_key,
char * stored_key);
πΈ ARGUMENTS
Gsasl_hash hashβ aGsasl_hashelement, like, for exampleGSASL_HASH_SHA256. pick your fave hash, she doesn't judge π¦const char * passwordβ the input parameter holding the password. yes. that password. πunsigned int iteration_countβ how many PBKDF2 rounds to apply. more rounds = more work = more slay, but also more CPU, just saying πconst char * saltβ an input character array,saltlenlong, holding the salt for PBKDF2. seasoning matters π§β¨size_t saltlenβ the length ofsalt. she's gotta know how long the seasoning is πchar * salted_passwordβ a pre-allocated output array that gets the derived salted password πchar * client_keyβ a pre-allocated output array that gets the derived client key πchar * server_keyβ a pre-allocated output array that gets the derived server key πchar * stored_keyβ a pre-allocated output array that gets the derived stored key π
π DESCRIPTION
Okay so. This is the helper function that generates SCRAM secrets from a password. That's the whole vibe. One password in, four secrets out, main character energy β¨
β οΈ Real talk though: thesalted_password,client_key,server_key, andstored_keybuffers must have room to hold the digest for the givenhash. UseGSASL_HASH_MAX_SIZEβ it's big enough for all hashes, no cap π«Ά
Return value: returns GSASL_OK if it all worked out, or an error code if it did not π
π¦ SINCE
1.10 β she's been around, an icon since day one π
π€ REPORTING BUGS
Found a bug? Do not suffer in silence, bestie β report it to <bug-gsasl@gnu.org> π§
General guidelines for reporting bugs live at: https://www.gnu.org/gethelp/
The GNU SASL home page is: 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. (So slay, but respectfully π)
π 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. Obsessed, honestly π
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 2.2.4, straight from the gsasl manual, section 3 β go forth and derive those secrets π«Άβ¨
π¦ 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