import "qrand"
Package qrand provides true random numbers generated from the ANU Quantum Random Numbers Server, https://qrng.anu.edu.au, to which you must have connectivity for true randomness. Randomness from the quantum beyond!!! Fallback to Go's crypto/rand package in the event of no connectivity, but also return a PseudoRandomError.
Attempts is the number of times to retry() the GET request if an error occurs.
var Attempts int = 2
The way their site's api works...
var ILength = 10 //Number of "packages" to receive
var ISize = 2 //Number of "items" in those packages
SleepTime is the time to wait between retry() attempts.
var SleepTime time.Duration = time.Second * 1
func Get
func Get(size int) (out []byte, err error)
func Get returns a quantum random []byte of size and a nil error, or a pseudo-random []byte of size and an error of type PseudoRandomError, or nil and a regular, old error.
type PseudoRandomError
PseudoRandomError is the error type returned if no complete interaction with the WebSite occurs and a pseudo-random []byte is returned instead. Check for it with "if _, ok := x.(qrand.PseudoRandomError); ok {..."
type PseudoRandomError struct{}
func (PseudoRandomError) Error
func (f PseudoRandomError) Error() string
type Reader
Reader is a drop-in, true random number generator replacement for crypto/rand's Reader.
type Reader struct{}
func (*Reader) Read
func (r *Reader) Read(p []byte) (n int, err error)
Generated by gomarkdoc