Lines Matching defs:arc4random
1 /* $NetBSD: arc4random.c,v 1.38 2024/08/29 13:39:42 riastradh Exp $ */
33 * Legacy arc4random(3) API from OpenBSD reimplemented using the
43 * The arc4random(3) API may abort the process if:
50 * once, on the first use of any of the arc4random(3) API. KERN_ARND
55 __RCSID("$NetBSD: arc4random.c,v 1.38 2024/08/29 13:39:42 riastradh Exp $");
75 #include "arc4random.h"
79 __weak_alias(arc4random,_arc4random)
459 /* arc4random state: per-thread, per-process (zeroed in child on fork) */
635 arc4random(void)
675 * We want a uniform random choice in [0, n), and arc4random()
740 /* Test arc4random: should not be deterministic. */
741 if (printf("arc4random: %08"PRIx32"\n", arc4random()) < 0)
776 errx(1, "arc4random buffer overflow 0");
781 errx(1, "arc4random buffer overflow 1");
788 "arc4random buffer overflow 2");