File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package hamt
22
33import (
44 "context"
5+ crand "crypto/rand"
56 "encoding/hex"
67 "fmt"
78 "math/rand"
@@ -20,13 +21,13 @@ type rander struct {
2021
2122func (r * rander ) randString () string {
2223 buf := make ([]byte , 18 )
23- rand .Read (buf )
24+ crand .Read (buf )
2425 return hex .EncodeToString (buf )
2526}
2627
2728func (r * rander ) randValue () * CborByteArray {
2829 buf := CborByteArray (make ([]byte , 30 ))
29- rand .Read (buf )
30+ crand .Read (buf )
3031 return & buf
3132}
3233
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package hamt
33import (
44 "bytes"
55 "context"
6+ crand "crypto/rand"
67 "crypto/sha256"
78 "encoding/binary"
89 "encoding/hex"
@@ -126,13 +127,13 @@ func (h blockSizesHistogram) String() string {
126127
127128func randKey () string {
128129 buf := make ([]byte , 18 )
129- rand .Read (buf )
130+ crand .Read (buf )
130131 return hex .EncodeToString (buf )
131132}
132133
133134func randValue () * CborByteArray {
134135 buf := CborByteArray (make ([]byte , 30 ))
135- rand .Read (buf )
136+ crand .Read (buf )
136137 return & buf
137138}
138139
You can’t perform that action at this time.
0 commit comments