Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenSeed ¶
GenSeed generates a seed value using a cryptographically secure random number generator (CSRNG). Generated seed values should only be used to generate a truly random seed for a pseudo random number generator (PRNG), instead of using the program's initialization time. e.g. generated seed values do not make an arbitrary PRNG cryptographically secure.
Types ¶
type LockedSource ¶
LockedSource implements the rand.Source interface but is safe for usage with goroutines. Inspired by: golang.org/x/exp/rand
func NewLockedSource ¶
func NewLockedSource(seed int64) *LockedSource
NewLockedSource creates a new LockedSource
func (*LockedSource) Int63 ¶
func (ls *LockedSource) Int63() int64
Int63 wraps the original source Int63 call in a mutex
func (*LockedSource) Seed ¶
func (ls *LockedSource) Seed(seed int64)
Seed wraps the original source Seed call in a mutex
Click to show internal directories.
Click to hide internal directories.