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
2
2
3
3
import (
4
4
"context"
5
+ crand "crypto/rand"
5
6
"encoding/hex"
6
7
"fmt"
7
8
"math/rand"
@@ -20,13 +21,13 @@ type rander struct {
20
21
21
22
func (r * rander ) randString () string {
22
23
buf := make ([]byte , 18 )
23
- rand .Read (buf )
24
+ crand .Read (buf )
24
25
return hex .EncodeToString (buf )
25
26
}
26
27
27
28
func (r * rander ) randValue () * CborByteArray {
28
29
buf := CborByteArray (make ([]byte , 30 ))
29
- rand .Read (buf )
30
+ crand .Read (buf )
30
31
return & buf
31
32
}
32
33
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package hamt
3
3
import (
4
4
"bytes"
5
5
"context"
6
+ crand "crypto/rand"
6
7
"crypto/sha256"
7
8
"encoding/binary"
8
9
"encoding/hex"
@@ -126,13 +127,13 @@ func (h blockSizesHistogram) String() string {
126
127
127
128
func randKey () string {
128
129
buf := make ([]byte , 18 )
129
- rand .Read (buf )
130
+ crand .Read (buf )
130
131
return hex .EncodeToString (buf )
131
132
}
132
133
133
134
func randValue () * CborByteArray {
134
135
buf := CborByteArray (make ([]byte , 30 ))
135
- rand .Read (buf )
136
+ crand .Read (buf )
136
137
return & buf
137
138
}
138
139
You can’t perform that action at this time.
0 commit comments