core/crypto: Add has_rand_bytes

This allows runtime detection as to if `rand_bytes` is supported or not,
and lets us enable the test-case on all of the supported targets.
This commit is contained in:
Yawning Angel
2024-04-09 10:23:58 +09:00
parent a43a5b053c
commit b155fdf8c9
8 changed files with 35 additions and 1 deletions
+4
View File
@@ -9,3 +9,7 @@ package crypto
_rand_bytes :: proc(dst: []byte) {
unimplemented("crypto: rand_bytes not supported on this OS")
}
_has_rand_bytes :: proc () -> bool {
return false
}