Merge branch 'master' of github.com:dgrijalva/jwt-go

This commit is contained in:
Dave Grijalva 2015-01-07 09:54:51 -08:00
commit 7c18dce7b8
1 changed files with 1 additions and 2 deletions

View File

@ -1,7 +1,6 @@
package jwt package jwt
import ( import (
"bytes"
"crypto" "crypto"
"crypto/hmac" "crypto/hmac"
"errors" "errors"
@ -57,7 +56,7 @@ func (m *SigningMethodHMAC) Verify(signingString, signature string, key interfac
hasher := hmac.New(m.Hash.New, keyBytes) hasher := hmac.New(m.Hash.New, keyBytes)
hasher.Write([]byte(signingString)) hasher.Write([]byte(signingString))
if !bytes.Equal(sig, hasher.Sum(nil)) { if !hmac.Equal(sig, hasher.Sum(nil)) {
err = ErrSignatureInvalid err = ErrSignatureInvalid
} }
} }