shishi_derive_default_salt(3)

πŸ“¦
version 1.0.3 Β· 2 versions
  • 1.0.3 Β· debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0.2 Β· ubuntu jammy
, in debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– shishi_derive_default_salt β€” from the shishi manual, section 3 πŸ’–

okay bestie, sit down, hydrate, and let me tell you about the single most "it's giving default credentials" little function in the whole shishi library. this is shishi_derive_default_salt(3), and yes it's an API function, and yes it slays πŸ§‚βœ¨


✨ SYNOPSIS ✨

#include <shishi.h>

int shishi_derive_default_salt(Shishi * handle, const char * name, char
** salt);

like. look at her. three args, one int, zero drama πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • Shishi * handle β€” your shishi handle, the one you got from shishi_init(). no handle, no service, that's the vibe check. 🫢
  • const char * name β€” the principal name of the user. as in, whose salt are we cooking today. πŸ‘‘
  • char ** salt β€” the output variable, and it gets a newly allocated salt string dropped into it. freshly allocated, just for you, no cap. 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the tea: this function derives the default salt from a principal. and what even is the default salt, you ask? it's literally the concatenation of the decoded realm and the principal. that's it. that's the whole recipe. mix them together and boom, salt. πŸ§‚

not me thinking that's the most iconic little one-liner of cryptography-adjacent identity handling. it's giving "just concatenate and pray" but in a very official, standards-respecting way fr fr 😭


πŸ”₯ RETURN VALUE πŸ”₯

returns SHISHI_OK if it worked. that's the success case. anything else and... well, bestie, you know. 🌈


πŸ’€ REPORTING BUGS πŸ’€

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


Copyright Β© 2002-2022 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 basically: go off, redistribute, remix, just keep the receipts. periodt. πŸ’œ

🧚 SEE ALSO 🧚

the full documentation for shishi is maintained as a Texinfo manual. if the info and shishi programs are properly installed at your site, the command

info shishi

should give you access to the complete manual. iykyk πŸ“–βœ¨


and that's the whole page, bestie!! this one lives in the shishi manual, version 1.0.3, and it's the shishi_derive_default_salt(3) page specifically. go forth and salt responsibly πŸ§‚πŸ’–πŸ¦‹