Skip to content

wadey/cryptorand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cryptorand

-- import "github.com/wadey/cryptorand"

Package cryptorand provides a math/rand.Source64 implementation of crypto/rand

Example

r := rand.New(cryptorand.Source)
fmt.Println(r.Float64() == r.Float64())

// Output:
// false

Usage

var Source rand.Source

Source is a math/rand.Source64 backed by crypto/rand. Calling Seed() will result in a panic.

func NewSource

func NewSource(rand io.Reader) rand.Source

NewSource returns a new rand.Source64 backed by the given random source. Calling Seed() will result in a panic.

About

Package cryptorand provides a math/rand.Source64 implementation of crypto/rand

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages