Unexport randEntropy type and use exported Reader instead

This commit is contained in:
Gustav Simonsson
2015-02-13 15:38:18 +01:00
parent 8c056aebe1
commit 39434e383b
2 changed files with 7 additions and 5 deletions

View File

@ -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