Documentation
¶
Overview ¶
Package pcg provides a seedable PCG-based PRNG for tests and non-cryptographic randomness.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidSeedLength = errs.New("seed length is not 8 bytes") ErrInvalidSaltLength = errs.New("salt length is not 8 bytes") )
Functions ¶
This section is empty.
Types ¶
type Pcg ¶
type Pcg struct {
// contains filtered or unexported fields
}
func NewRandomised ¶
func NewRandomised() *Pcg
NewRandomised creates a new PCG PRNG with random seed and salt.
func (*Pcg) New ¶
func (*Pcg) New(seed, salt []byte) (prng.SeedablePRNG, error)
New generates a new PRNG of the same type with the provided seed and salt.
Click to show internal directories.
Click to hide internal directories.