Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Randomizer ¶
Randomizer implements the io.Reader interface. A Randomizer can be used to generate random bytes.
func NewRandomizer ¶
func NewRandomizer() Randomizer
NewRandomizer returns a new Randomizer instance. It uses the crypto/rand package to generate random bytes.
func (Randomizer) GenerateBytes ¶
func (r Randomizer) GenerateBytes(n int) ([]byte, error)
GenerateBytes generates a n bytes slice of random bytes. It can return an error if the random bytes cannot be read. For further information, see the io.Reader interface.
Click to show internal directories.
Click to hide internal directories.