func (s ECDSASigner) Sign(payload []byte, key interface{}) ([]byte, error) {
	if key == nil {
		return nil, errors.New(`missing private key while signing payload`)
	}

	privateKey, ok := key.(*ecdsa.PrivateKey)
	if !ok {
		return nil, errors.Errorf(`invalid key type %T. *ecdsa.PrivateKey is required`, key)
	}

	return s.sign(payload, privateKey)
}
// Sign signs payload with a ECDSA private key
Sign signs payload with a ECDSA private key
// Sign signs payload with a ECDSA private key
func (s ECDSASigner) Sign(payload []byte, key interface{}) ([]byte, error) {
	if key == nil {
		return nil, errors.New(`missing private key while signing payload`)
	}
	privateKey, ok := key.(*ecdsa.PrivateKey)
	if !ok {
		return nil, errors.Errorf(`invalid key type %T. *ecdsa.PrivateKey is required`, key)
	}
	return s.sign(payload, privateKey)
}
func ( s ECDSASigner ) Sign ( payload [ ] byte , key interface { } ) ( [ ] byte , error ) { if key == nil { return nil , errors . New ( `missing private key while signing payload` ) } privateKey , ok := key . ( * ecdsa . PrivateKey ) if ! ok { return nil , errors . Errorf ( `invalid key type %T. *ecdsa.PrivateKey is required` , key ) } return s . sign ( payload , privateKey ) }
Sign signs payload with a ECDSA private key
Sign signs payload with a ECDSA private key