package main import ( "crypto/rand" "encoding/binary" ) type cryptoSource struct{} func (c cryptoSource) Seed(seed int64) {} func (c cryptoSource) Int63() int64 { return int64(c.Uint64() &^ uint64(1<<63)) } func (c cryptoSource) Uint64() uint64 { var v uint64 if err := binary.Read(rand.Reader, binary.BigEndian, &v); err != nil { panic(err) } return v }