Lines Matching defs:arc4random
1 /* $NetBSD: arc4random.c,v 1.50 2025/03/11 14:30:27 riastradh Exp $ */
33 * Legacy arc4random(3) API from OpenBSD reimplemented using the
43 * The arc4random(3) API may abort the process if:
49 * the arc4random(3) API. KERN_ARND is unlikely to fail later unless
54 __RCSID("$NetBSD: arc4random.c,v 1.50 2025/03/11 14:30:27 riastradh Exp $");
73 #include "arc4random.h"
77 __weak_alias(arc4random,_arc4random)
525 /* arc4random state: per-thread, per-process (zeroed in child on fork) */
664 * state to avoid contention due to arc4random.
673 * Note that the arc4random library state has been initialized
745 arc4random(void)
785 * We want a uniform random choice in [0, n), and arc4random()
850 /* Test arc4random: should not be deterministic. */
851 if (printf("arc4random: %08"PRIx32"\n", arc4random()) < 0)
886 errx(1, "arc4random buffer overflow 0");
891 errx(1, "arc4random buffer overflow 1");
898 "arc4random buffer overflow 2");