mirror of
https://github.com/odin-lang/Odin.git
synced 2026-03-06 08:37:05 +00:00
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).
8 lines
147 B
Odin
8 lines
147 B
Odin
package crypto
|
|
|
|
when ODIN_OS != "linux" {
|
|
_rand_bytes :: proc (dst: []byte) {
|
|
unimplemented("crypto: rand_bytes not supported on this OS")
|
|
}
|
|
}
|