core/crypto: Add a HAS_RAND_BYTES constant

This commit is contained in:
Yawning Angel
2024-04-23 11:47:43 +09:00
parent 902e877467
commit a6eb64df6c
8 changed files with 24 additions and 31 deletions
+4 -4
View File
@@ -4,8 +4,12 @@ import "core:fmt"
import "core:sys/linux"
HAS_RAND_BYTES :: true
@(private)
_MAX_PER_CALL_BYTES :: 33554431 // 2^25 - 1
@(private)
_rand_bytes :: proc (dst: []byte) {
dst := dst
l := len(dst)
@@ -34,7 +38,3 @@ _rand_bytes :: proc (dst: []byte) {
dst = dst[n_read:]
}
}
_has_rand_bytes :: proc() -> bool {
return true
}