Skip to content

Commit

Permalink
fix: return ErrInvalidKeyType with message when Key is invalid type
Browse files Browse the repository at this point in the history
  • Loading branch information
ss49919201 committed Dec 24, 2023
1 parent c12025f commit 3386e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hmac.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,5 @@ func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) ([]byte,
return hasher.Sum(nil), nil
}

return nil, ErrInvalidKeyType
return nil, newError("HMAC sign expects []byte", ErrInvalidKeyType)
}

0 comments on commit 3386e55

Please sign in to comment.