mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
core/crypto: Add a HAS_RAND_BYTES constant
This commit is contained in:
@@ -6,8 +6,12 @@ foreign odin_env {
|
||||
env_rand_bytes :: proc "contextless" (buf: []byte) ---
|
||||
}
|
||||
|
||||
HAS_RAND_BYTES :: true
|
||||
|
||||
@(private)
|
||||
_MAX_PER_CALL_BYTES :: 65536 // 64kiB
|
||||
|
||||
@(private)
|
||||
_rand_bytes :: proc(dst: []byte) {
|
||||
dst := dst
|
||||
|
||||
@@ -18,7 +22,3 @@ _rand_bytes :: proc(dst: []byte) {
|
||||
dst = dst[to_read:]
|
||||
}
|
||||
}
|
||||
|
||||
_has_rand_bytes :: proc() -> bool {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user