aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--securecookie.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/securecookie.go b/securecookie.go
index 620c508..9218dc4 100644
--- a/securecookie.go
+++ b/securecookie.go
@@ -255,7 +255,7 @@ func createMac(h hash.Hash, value []byte) []byte {
// verifyMac verifies that a message authentication code (MAC) is valid.
func verifyMac(h hash.Hash, value []byte, mac []byte) error {
mac2 := createMac(h, value)
- if len(mac) == len(mac2) && subtle.ConstantTimeCompare(mac, mac2) == 1 {
+ if subtle.ConstantTimeCompare(mac, mac2) == 1 {
return nil
}
return ErrMacInvalid