Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CryptoRandInt64 ¶ added in v0.38.5
func NewSeedInt64Crypto ¶ added in v0.41.0
NewSeedInt64Crypto creates an `int64` seed value for `math/rand`. This is preferred over `NewSeedInt64Time()`. See: https://stackoverflow.com/a/54491783/1908967
func NewSeedInt64Time ¶ added in v0.41.0
func NewSeedInt64Time() int64
NewSeedInt64Time creates an `int64` seed value for `math/rand` based on `time.Now()`. This can have reduced entropy if used constantly throughout with shourl time differentials. See: https://stackoverflow.com/a/12321192/1908967
Types ¶
type CryptoRand ¶
type CryptoRand struct {
// contains filtered or unexported fields
}
func NewCryptoRand ¶
func NewCryptoRand(r io.Reader, s mrand.Source) CryptoRand
func (*CryptoRand) MustInt64n ¶
func (cr *CryptoRand) MustInt64n(n int64) int64
func (*CryptoRand) MustIntn ¶
func (cr *CryptoRand) MustIntn(n int) int
Click to show internal directories.
Click to hide internal directories.