Commit Graph

7 Commits

Author SHA1 Message Date
gingerBill
3ff8952813 Replace panic(fmt.tprintf( antipattern with fmt.panicf 2024-06-11 13:11:14 +01:00
Yawning Angel
a6eb64df6c core/crypto: Add a HAS_RAND_BYTES constant 2024-04-23 11:47:43 +09:00
Vitalii Kravchenko
befb0f7868 Core Foundation and Security vendor libraries. 2024-04-13 00:11:42 +01:00
Yawning Angel
b155fdf8c9 core/crypto: Add has_rand_bytes
This allows runtime detection as to if `rand_bytes` is supported or not,
and lets us enable the test-case on all of the supported targets.
2024-04-09 10:23:58 +09:00
flysand7
4d65b1ab9c Implement new sys/unix package 2023-10-27 10:51:21 +11:00
Colin Davidson
edd78ae129 cleanup of os/linux 2023-02-28 01:17:43 -08:00
Yawning Angel
6bafa21bee crypto: Add rand_bytes
This adds `rand_bytes(dst: []byte)` which fills the destination buffer
with entropy from the cryptographic random number generator.  This takes
the "simple is best" approach and just directly returns the OS CSPRNG
output instead of doing anything fancy (a la OpenBSD's arc4random).
2021-11-17 14:00:00 +00:00