Documentation ¶
Overview ¶
Package bytesource provides a rand.Source64 that is determined by a slice of bytes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteSource ¶
ByteSource implements rand.Source64 determined by a slice of bytes. The random numbers are generated from each 8 bytes in the slice, until the last bytes are consumed, from which a fallback pseudo random source is created in case more random numbers are required. It also exposes a `bytes.Reader` API, which lets callers consume the bytes directly.
func New ¶
func New(input []byte) *ByteSource
New returns a new ByteSource from a given slice of bytes.
func (*ByteSource) Int63 ¶
func (s *ByteSource) Int63() int64
func (*ByteSource) Seed ¶
func (s *ByteSource) Seed(seed int64)
func (*ByteSource) Uint64 ¶
func (s *ByteSource) Uint64() uint64
Click to show internal directories.
Click to hide internal directories.