crypto.go
1package platform
2
3import (
4 "io"
5 "math/rand"
6)
7
8// seed is a fixed seed value for NewFakeRandSource.
9//
10// Trivia: While arbitrary, 42 was chosen as it is the "Ultimate Answer" in
11// the Douglas Adams novel "The Hitchhiker's Guide to the Galaxy."
12const seed = int64(42)
13
14// NewFakeRandSource returns a deterministic source of random values.
15func NewFakeRandSource() io.Reader {
16 return rand.New(rand.NewSource(seed))
17}