aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/randentropy
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-02-13 22:38:18 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-02-13 22:38:26 +0800
commit39434e383b9e6fee30371afd5a9841de75671f56 (patch)
treea1c5cd30f649cf73b36c0bdde0f47caa1fbbd2c0 /crypto/randentropy
parent8c056aebe10c8c56f7c25889780b04e00f9ca00b (diff)
downloaddexon-39434e383b9e6fee30371afd5a9841de75671f56.tar
dexon-39434e383b9e6fee30371afd5a9841de75671f56.tar.gz
dexon-39434e383b9e6fee30371afd5a9841de75671f56.tar.bz2
dexon-39434e383b9e6fee30371afd5a9841de75671f56.tar.lz
dexon-39434e383b9e6fee30371afd5a9841de75671f56.tar.xz
dexon-39434e383b9e6fee30371afd5a9841de75671f56.tar.zst
dexon-39434e383b9e6fee30371afd5a9841de75671f56.zip
Unexport randEntropy type and use exported Reader instead
Diffstat (limited to 'crypto/randentropy')
-rw-r--r--crypto/randentropy/rand_entropy.go6
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