Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Reader io.Reader //nolint:gochecknoglobals
Reader provides a random reader that can reset during testing.
Functions ¶
func CryptoRandomBytes ¶
Types ¶
type DefaultRandomGenerator ¶
type DefaultRandomGenerator struct{}
DefaultRandomGenerator uses crypto/rand.Reader to generate random bytes.
func (DefaultRandomGenerator) CryptoRandomBytes ¶
func (g DefaultRandomGenerator) CryptoRandomBytes(max int) ([]byte, error)
CryptoRandomBytes generates random bytes using the crypto/rand package.
type RandomGenerator ¶
var CryptoRandGen RandomGenerator = DefaultRandomGenerator{} //nolint:gochecknoglobals
CryptoRandGen provides RandomGenerator interface that can reset during testing.
Click to show internal directories.
Click to hide internal directories.