shishi_key_from_random(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_key_from_random ✨

okay bestie, welcome to shishi_key_from_random(3) β€” it's part of the shishi manual, and it is literally the glow-up station for turning random bytes into a real, usable key. πŸ’–


πŸŽ€ NAME πŸŽ€

shishi_key_from_random β€” it's an API function, bestie. that's the whole job description. πŸ‘‘


🌸 SYNOPSIS 🌸

#include <shishi.h>

int shishi_key_from_random(Shishi * handle, int32_t type, const char *
rnd, size_t rndlen, Shishi_key ** outkey);

look at her. five arguments. no notes. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • Shishi * handle β€” the Shishi library handle, and you gotta create it with shishi_init() first, no skipping steps bestie πŸ’…
  • int32_t type β€” the type of key. that's it, that's the vibe. 🌈
  • const char * rnd β€” random data. the chaos source. the ✨material✨.
  • size_t rndlen β€” how long that random data is. length. that's the one.
  • Shishi_key ** outkey β€” a pointer to the structure that's gonna hold the newly created key information. she's the output, she's the main character, she gets the goods 🫢

πŸ’œ DESCRIPTION πŸ’œ

so what actually happens here? you create a new Key information structure, and then you set the key type and the key value using shishi_random_to_key(). that's the whole transformation arc, iconic behavior honestly.

⚠️ important, no cap: KEY contains a newly allocated structure only if this function is successful. so like… don't go using it if it flopped. check the return value first, babe. πŸ’€

⭐ RETURN VALUE ⭐

Returns SHISHI_OK iff successful. and if it's not SHISHI_OK? that's not a slay, that's a red flag, handle accordingly. 🚩


πŸ™ˆ REPORTING BUGS πŸ™ˆ

found a bug? don't be shy, report it to <bug-shishi@gnu.org>. πŸ›


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. (yes bestie, keep the receipts, always πŸ’–)


🌈 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 page, bestie!! this was the shishi_key_from_random(3) manpage, hailing from version 1.0.3 of shishi. go forth and make keys, you absolute legend πŸ’…πŸŒΈπŸ¦‹