hmac.go
func (hs *HmacSigner) Verify(buf, sig []byte) ([]byte, error) {
	var err error

	// decode
	dec, err := b64.DecodeString(string(sig))
	if err != nil {
		return nil, err
	}

	// verify
	err = hs.VerifyBytes(buf, dec)
	if err != nil {
		return nil, err
	}

	return dec, nil
}
func (hs *HmacSigner) Verify(buf, sig []byte) ([]byte, error) {
	var err error

	// decode
	dec, err := b64.DecodeString(string(sig))
	if err != nil {
		return nil, err
	}

	// verify
	err = hs.VerifyBytes(buf, dec)
	if err != nil {
		return nil, err
	}

	return dec, nil
}
func ( hs * HmacSigner ) Verify ( buf , sig [ ] byte ) ( [ ] byte , error ) { var err error // decode dec , err := b64 . DecodeString ( string ( sig ) ) if err != nil { return nil , err } // verify err = hs . VerifyBytes ( buf , dec ) if err != nil { return nil , err } return dec , nil }
// Verify creates a signature for buf, comparing it against the URL-safe base64
// encoded sig and returning the decoded signature. If the sig is invalid, then
// ErrInvalidSignature will be returned.
Verify creates a signature for buf comparing it against the URL - safe base64 encoded sig and returning the decoded signature . If the sig is invalid then ErrInvalidSignature will be returned .