mirror of https://github.com/golang-jwt/jwt.git
added documentation for HMAC Sign method
This commit is contained in:
parent
fb5e9d4418
commit
a3e2f13bb7
2
hmac.go
2
hmac.go
|
@ -66,6 +66,8 @@ func (m *SigningMethodHMAC) Verify(signingString, signature string, key interfac
|
|||
return ErrInvalidKey
|
||||
}
|
||||
|
||||
// Implements the Sign method from SigningMethod for this signing method.
|
||||
// Key must be []byte
|
||||
func (m *SigningMethodHMAC) Sign(signingString string, key interface{}) (string, error) {
|
||||
if keyBytes, ok := key.([]byte); ok {
|
||||
if !m.Hash.Available() {
|
||||
|
|
Loading…
Reference in New Issue