Skip to content

Commit e9915b9

Browse files
authored
Merge pull request #64 from thaJeztah/fix_algorithms_not_being_registered
make sure the standard algorithms are registered
2 parents b0b31a4 + 084376b commit e9915b9

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

algorithm_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ import (
1919
"bytes"
2020
"crypto"
2121
"crypto/rand"
22-
_ "crypto/sha256"
23-
_ "crypto/sha512"
2422
"flag"
2523
"fmt"
2624
"strings"

digestset/set_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package digestset
1717

1818
import (
1919
"crypto/sha256"
20-
_ "crypto/sha512"
2120
"encoding/binary"
2221
"math/rand"
2322
"testing"

sha.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ package digest
22

33
import (
44
"crypto"
5+
6+
// make sure crypto.SHA256 is registered
7+
_ "crypto/sha256"
8+
9+
// make sure crypto.sha512 and crypto.SHA384 are registered
10+
_ "crypto/sha512"
511
)
612

713
const (

0 commit comments

Comments
 (0)