Default
The default implementation of CryptoRand.
The following APIs are used for procuring cryptographically secure random data:
Js:
Browser: Crypto.getRandomValues()
Node: Crypto.randomFillSync()
WasmJs:
Browser: Crypto.getRandomValues()
Node: Crypto.randomFillSync()
WasmWasi: random_get
Native:
Linux & Android Native targets: getrandom(2) when available (GLIBC 2.25+ & Android API 23+), with a fallback to reading from
/dev/urandom
after polling/dev/random
once (per process lifetime) to ensure appropriate levels of system entropy are had.Apple targets: CCRandomGenerateBytes
Windows targets: BCryptGenRandom