Commit e9131df3 authored by Brian Tiger Chow's avatar Brian Tiger Chow Committed by Juan Batiz-Benet
parent 2cb4e59e
......@@ -120,7 +120,7 @@
},
{
"ImportPath": "github.com/jbenet/go-random",
"Rev": "e4585173eb8c47eea36c3dbff22f26f3f94d3586"
"Rev": "2e83344e7dc7898f94501665af34edd4aa95a013"
},
{
"ImportPath": "github.com/kr/binarydist",
......
......@@ -26,10 +26,10 @@ func WritePseudoRandomBytes(count int64, w io.Writer, seed int64) error {
b = b[:bufsize]
}
var n int64
for i := int64(0); i < bufsize; i++ {
n = randmath.Int63()
for j := 0; j < 8 && i < bufsize; j++ {
var n uint32
for i := int64(0); i < bufsize; {
n = randmath.Uint32()
for j := 0; j < 4 && i < bufsize; j++ {
b[i] = byte(n & 0xff)
n >>= 8
i++
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment