Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufPRGReader ¶
func NewBufPRG ¶
func NewBufPRG(prg *PRGReader) *BufPRGReader
func NewRandomBufPRG ¶
func NewRandomBufPRG() *BufPRGReader
func (*BufPRGReader) Int63 ¶
func (b *BufPRGReader) Int63() int64
func (*BufPRGReader) MathRand ¶
func (r *BufPRGReader) MathRand() *mrand.Rand
func (*BufPRGReader) Seed ¶
func (b *BufPRGReader) Seed(int64)
func (*BufPRGReader) Uint64 ¶
func (b *BufPRGReader) Uint64() uint64
type PRGReader ¶
type PRGReader struct { Key PRGKey // contains filtered or unexported fields }
We use the AES-CTR to generate pseudo-random numbers using a stream cipher. Go's native rand.Reader is extremely slow because it makes tons of system calls to generate a small number of pseudo-random bytes.
Click to show internal directories.
Click to hide internal directories.