Skip to content

Commit

Permalink
fix: switch to crypto/rand.Read
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Feb 14, 2023
1 parent dbdb3e0 commit 1762841
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package util_test

import (
"bytes"
crand "crypto/rand"
"math/rand"
"testing"

Expand All @@ -15,7 +16,7 @@ func TestLdSize(t *testing.T) {
data := make([][]byte, 5)
for j := 0; j < 5; j++ {
data[j] = make([]byte, rand.Intn(30))
_, err := rand.Read(data[j])
_, err := crand.Read(data[j])
require.NoError(t, err)
}
size := util.LdSize(data...)
Expand Down
3 changes: 2 additions & 1 deletion v2/internal/carv1/util/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package util_test

import (
"bytes"
crand "crypto/rand"
"math/rand"
"testing"

Expand All @@ -16,7 +17,7 @@ func TestLdSize(t *testing.T) {
data := make([][]byte, 5)
for j := 0; j < 5; j++ {
data[j] = make([]byte, rand.Intn(30))
_, err := rand.Read(data[j])
_, err := crand.Read(data[j])
require.NoError(t, err)
}
size := util.LdSize(data...)
Expand Down

0 comments on commit 1762841

Please sign in to comment.