diff options
Diffstat (limited to 'crypto/randentropy/rand_entropy.go')
-rw-r--r-- | crypto/randentropy/rand_entropy.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/randentropy/rand_entropy.go b/crypto/randentropy/rand_entropy.go index 28181030c..b87fa564e 100644 --- a/crypto/randentropy/rand_entropy.go +++ b/crypto/randentropy/rand_entropy.go @@ -10,10 +10,12 @@ import ( "time" ) -type RandEntropy struct { +var Reader io.Reader = &randEntropy{} + +type randEntropy struct { } -func (*RandEntropy) Read(bytes []byte) (n int, err error) { +func (*randEntropy) Read(bytes []byte) (n int, err error) { readBytes := GetEntropyMixed(len(bytes)) copy(bytes, readBytes) return len(bytes), nil |