package rand
Import Path
crypto/internal/rand (on go.dev)
Dependency Relation
imports 6 packages, and imported by 7 packages
Package-Level Type Names (total 2, neither is exported)
Package-Level Functions (total 4, in which 3 are exported)
CustomReader returns [Reader] or, only if the GODEBUG setting
"cryptocustomrand=1" is set, the provided io.Reader.
If returning a non-default Reader, it calls [randutil.MaybeReadByte] on it,
unless it's the global testing Reader set with [SetTestingReader].
IsDefaultReader reports whether r is the default [crypto/rand.Reader].
If true, the Read method of r can be assumed to call [drbg.Read].
SetTestingReader overrides all calls to [drbg.Read]. The Read method of
r must never return an error or return short.
SetTestingReader panics when building against Go Cryptographic Module v1.0.0.
SetTestingReader is pulled by [testing/cryptotest.SetGlobalRandom] via go:linkname.
Package-Level Variables (total 3, in which 1 is exported)
Reader is an io.Reader that calls [drbg.Read].
It should be used internally instead of [crypto/rand.Reader], because the
latter can be set by applications outside of tests. These applications then
risk breaking between Go releases, if the way the Reader is used changes.
The pages are generated with Golds v0.8.4. (GOOS=linux GOARCH=amd64)