Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecureSeed ¶
SecureSeed returns 32 bytes of secure random data for use as a ChaCha8 seed.
Types ¶
type SyncEntropy ¶
type SyncEntropy struct {
// contains filtered or unexported fields
}
SyncEntropy provides a concurrent-safe ChaCha8 random number generator for use as an io.Reader entropy source.
The ChaCha8 Read() function is apparently not concurrent-safe even though the top-level Int and Float functions are.
func NewSyncEntropy ¶
func NewSyncEntropy(seed [32]byte) *SyncEntropy
NewSyncEntropy creates a new SyncEntropy with an internal ChaCha8 generator using the given seed.
Click to show internal directories.
Click to hide internal directories.