shishi_string_to_key(3)
π shishi_string_to_key β the glow-up page π
okay bestie, welcome to section 3 of the shishi manual β this is the one about shishi_string_to_key, and yes it's the API function era of your life, we love that for us. π¦
β¨ NAME β¨
shishi_string_to_key β API function
πΈ SYNOPSIS πΈ
#include <shishi.h>
int shishi_string_to_key(Shishi * handle, int32_t keytype, const char *
password, size_t passwordlen, const char * salt, size_t saltlen, const
char * parameter, Shishi_key * outkey);
likeβ¦ look at that signature. it's giving eight arguments and zero regrets. π
π ARGUMENTS π
Shishi * handleβ the shishi handle, and you gotta get it fromshishi_init(), no cap. that's literally where it comes from. π«Άint32_t keytypeβ the cryptographic encryption type. go peepShishi_etypefor the deets, iykyk. π₯const char * passwordβ input array holding the password. yes the actual password. keep it cute, keep it secret. πsize_t passwordlenβ the length of that password input array. she needs to know how long it is, periodt.const char * saltβ input array with the salt. iconic behaviour honestly. π§β¨size_t saltlenβ length of the salt input array. matching energy, we stan.const char * parameterβ input array with opaque, encryption-type-specific info. it's giving mysterious, it's giving opaque, and honestly? same. πShishi_key * outkeyβ an allocated key handle, and this one's the main character because it's gonna contain the brand new key when we're done. π
π DESCRIPTION π
so what does she actually do? she derives a key from a string (the password) plus a salt β and btw the salt is commonly the concatenation of realm and principal, so jot that down π β for the specified key type. then she sets the type and the value in the given key to those computed values. that's the whole vibe. π
and about that parameter value: it's specific for each keytype, and you can set it if the parameter information is not available. like if you don't have it, you can still provide it. slay.
β RETURN VALUE β
returns SHISHI_OK iff successful. that's it. that's the tea. if you see SHISHI_OK you ate and left no crumbs. π₯
π REPORTING BUGS π
found a bug? not me being the one to tell you, but like, please report it:
Report bugs to <bug-shishi@gnu.org>.
- GNU Shishi home page:
http://www.gnu.org/software/shishi/ - General help using GNU software:
http://www.gnu.org/gethelp/
they wanna hear from you, fr fr. π«Ά
π COPYRIGHT π
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.
(that's the legal speak, and it's honestly kind of iconic that they just let you copy it, we love a generous king π)
π 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. that's the whole plug, bestie. π¦
and that's a wrap on shishi_string_to_key(3), from the shishi manual, version 1.0.3 β mwah, go derive some keys, you absolute legend π
β¨π
π¦ where this page comes from
- debian bookworm: shishi-doc 1.0.3-1 Β· GPL-3.0-or-later
- debian trixie: shishi-doc 1.0.3-5 Β· GPL-3.0-or-later
- nixos 26.05: shishi 1.0.3
- nixpkgs unstable: shishi 1.0.3
- ubuntu noble: shishi-doc 1.0.3-2.1build2 Β· GPL-3.0-or-later
- ubuntu questing: shishi-doc 1.0.3-5
- ubuntu resolute: shishi-doc 1.0.3-5build1 Β· GPL-3.0-or-later
- ubuntu stonking: shishi-doc 1.0.3-7 Β· 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