aboutsummaryrefslogtreecommitdiff
path: root/core/crypto/rand_openbsd.odin
blob: bae97e8f084d796c8877d17fdda44dfadc99d9d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
package crypto

import "core:c"

foreign import libc "system:c"
foreign libc {
	arc4random_buf :: proc "c" (buf: rawptr, nbytes: c.size_t) ---
}

_rand_bytes :: proc (dst: []byte) {
	arc4random_buf(raw_data(dst), len(dst))
}