Skip to content

Commit

Permalink
fix hashToMD
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Sep 3, 2024
1 parent 5abc52a commit c9c9a25
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions evp.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ var cacheMD sync.Map
func hashToMD(h hash.Hash) C.GO_EVP_MD_PTR {
var ch crypto.Hash
switch h.(type) {
case *sha1Hash:
case *sha1Hash, *sha1Marshal:
ch = crypto.SHA1
case *sha224Hash:
case *sha224Hash, *sha224Marshal:
ch = crypto.SHA224
case *sha256Hash:
case *sha256Hash, *sha256Marshal:
ch = crypto.SHA256
case *sha384Hash:
case *sha384Hash, *sha384Marshal:
ch = crypto.SHA384
case *sha512Hash:
case *sha512Hash, *sha512Marshal:
ch = crypto.SHA512
case *sha3_224Hash:
ch = crypto.SHA3_224
Expand Down

0 comments on commit c9c9a25

Please sign in to comment.