mirror of
https://github.com/odin-lang/Odin.git
synced 2025-12-30 09:54:45 +00:00
13 lines
225 B
Odin
13 lines
225 B
Odin
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))
|
|
}
|