Add system_random and random_bytes for js target

This commit is contained in:
Damian Tarnawski
2023-10-27 00:05:38 +02:00
parent 0a492acaa1
commit 11a2b2a942
4 changed files with 39 additions and 2 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
package crypto
when ODIN_OS != .Linux && ODIN_OS != .OpenBSD && ODIN_OS != .Windows {
_rand_bytes :: proc (dst: []byte) {
when ODIN_OS != .Linux && ODIN_OS != .OpenBSD && ODIN_OS != .Windows && ODIN_OS != .JS {
_rand_bytes :: proc(dst: []byte) {
unimplemented("crypto: rand_bytes not supported on this OS")
}
}