GENRANDOM(3)
π NAME π
okay so this is GENRANDOM(3), straight outta the Library Functions Manual, and it's all about genrandom, prng β random number generation, bestie. Like, the whole βwhere do unguessable numbers come fromβ situation. β¨
πΈ SYNOPSIS πΈ
#include <u.h>
#include <libc.h>
#include <mp.h>
#include <libsec.h>
void genrandom(uchar *buf, int nbytes)
void prng(uchar *buf, int nbytes)
π¦ DESCRIPTION π¦
Most security software literally requires a source of random numbers β or, at the very least, numbers you canβt guess. no cap. π
genrandomfills a buffer with bytes from the X9.17 pseudo-random number generator. The X9.17 generator is seeded by 24 truly random bytes read viatruerand(seerand(3)). πprnguses the nativerand(3)pseudo-random number generator to fill the buffer. Used withsrand, this function can produce a reproducible stream of pseudo random numbers useful in testing. π«Ά
Both functions may be passed to mprand (see mp(3)). π
β SOURCE β
/src/libsec
π SEE ALSO π
thatβs the GENRANDOM(3) page, sourced from /src/libsec β and tbh this one doesnβt print a date or version line, so Iβm not gonna invent one, bestie. π
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms