diff --git a/algorithm_test.go b/algorithm_test.go index 060819e..a10b45d 100644 --- a/algorithm_test.go +++ b/algorithm_test.go @@ -19,8 +19,6 @@ import ( "bytes" "crypto" "crypto/rand" - _ "crypto/sha256" - _ "crypto/sha512" "flag" "fmt" "strings" diff --git a/digestset/set_test.go b/digestset/set_test.go index 7a01c24..d2c5174 100644 --- a/digestset/set_test.go +++ b/digestset/set_test.go @@ -17,7 +17,6 @@ package digestset import ( "crypto/sha256" - _ "crypto/sha512" "encoding/binary" "math/rand" "testing" diff --git a/sha.go b/sha.go index 0e2201f..a9f864f 100644 --- a/sha.go +++ b/sha.go @@ -2,6 +2,12 @@ package digest import ( "crypto" + + // make sure crypto.SHA256 is registered + _ "crypto/sha256" + + // make sure crypto.sha512 and crypto.SHA384 are registered + _ "crypto/sha512" ) const (