added documentation for HMAC Sign method

This commit is contained in:
Dave Grijalva 2015-01-13 21:33:50 -08:00
parent fb5e9d4418
commit a3e2f13bb7
1 changed files with 2 additions and 0 deletions

View File

@ -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() {