shishi_randomize(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_randomize πŸ’–

okay bestie, welcome to the shishi manual, section 3 β€” this one's about shishi_randomize, and it's genuinely such a cute little function. she fills your buffer with cryptographically random data and asks for basically nothing in return. queen behavior fr fr πŸ’…


🌸 NAME 🌸

shishi_randomize β€” an API function. that's the whole vibe, no notes ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <shishi.h>

int shishi_randomize(Shishi * handle, int strong, void * data, size_t
datalen);

look at her. four little arguments, one int coming back. so simple, so iconic 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • Shishi * handle β€” the shishi handle, which you got from shishi_init(). like, you can't just show up without it, bestie, that's your whole identity here.
  • int strong β€” okay so this one is doing a lot with a little. it's 0 iff the operation should not block, and non-0 when you want very strong randomness. so like, 0 = fast and chill, non-0 = go all in and possibly make me wait. choose wisely πŸ’€
  • void * data β€” the output array, aka the lil container that's gonna get filled with random data. it's giving empty cup, about to be blessed πŸ™ˆ
  • size_t datalen β€” the size of that output array. she needs to know how much random to pour in. no cap.

✨ DESCRIPTION ✨

Store cryptographically random data of given size in the provided buffer.

that's it. that's the whole thing. she takes your buffer, she takes a size, and she makes it random. lowkey the most trustworthy friend in the group chat πŸ”₯


πŸ‘‘ RETURN VALUE πŸ‘‘

Returns SHISHI_OK iff successful. anything else? not ok. that's the entire rule, periodt πŸ’…


πŸ’€ REPORTING BUGS πŸ’€

found a bug? do not gatekeep it, bestie, tell the devs:

they literally want to hear from you, it's not that deep 🫢


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.

(translation: take it, share it, remix it, just keep the receipts. slay.)


⭐ 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 β€” go read the whole thing, it's worth it πŸ“šβœ¨


and that's the page!! this was shishi_randomize(3) from the shishi manual, version 1.0.3. mwah, ily, go generate some entropy πŸ’–πŸ§šπŸŒΈ