Functions
Read
function
#
Read fills b with cryptographically secure random bytes from the operating
system. It always fills b entirely and crashes the program irrecoverably if
an error is encountered. The operating system APIs are documented to never
return an error on all but legacy Linux systems.
func Read(b []byte)
fatal
function
#
fatal is [runtime.fatal], pushed via linkname.
go:linkname fatal
func fatal(string)
getRandomValues
function
#
go:wasmimport gojs runtime.getRandomData
go:noescape
func getRandomValues(r []byte)
read
function
#
arc4random_buf is the recommended application CSPRNG, accepts buffers of
any size, and never returns an error.
"The subsystem is re-seeded from the kernel random number subsystem on a
regular basis, and also upon fork(2)." - arc4random(3)
Note that despite its legacy name, it uses a secure CSPRNG (not RC4) in
all supported macOS versions.
func read(b []byte) error
read
function
#
func read(b []byte) error
read
function
#
read calls the JavaScript Crypto.getRandomValues() method.
See https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues.
func read(b []byte) error
read
function
#
func read(b []byte) error
read
function
#
func read(b []byte) error
read
function
#
func read(b []byte) error
read
function
#
func read(b []byte) error
read
function
#
func read(b []byte) error
urandomRead
function
#
func urandomRead(b []byte) error
warnBlocked
function
#
func warnBlocked()