File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
1
package identity
2
2
3
3
import (
4
- cryptorand "crypto/rand"
4
+ "crypto/rand"
5
5
"io"
6
6
"math/big"
7
-
8
- "github.com/pkg/errors"
9
7
)
10
8
11
9
var (
12
10
// idReader is used for random id generation. This declaration allows us to
13
11
// replace it for testing.
14
- idReader = cryptorand .Reader
12
+ idReader = rand .Reader
15
13
)
16
14
17
15
// parameters for random identifier generation. We can tweak this when there is
@@ -46,7 +44,7 @@ func NewID() string {
46
44
var p [randomIDEntropyBytes ]byte
47
45
48
46
if _ , err := io .ReadFull (idReader , p [:]); err != nil {
49
- panic (errors . Wrap ( err , "failed to read random bytes: %v" ))
47
+ panic ("failed to read random bytes: " + err . Error ( ))
50
48
}
51
49
52
50
p [0 ] |= 0x80 // set high bit to avoid the need for padding
You can’t perform that action at this time.
0 commit comments