code: func (m *SigningMethodRSA) Sign(signingString string, key interface{}) (string, error) {
  	var rsaKey *rsa.PrivateKey
  	var ok bool
  
  	// Validate type of key
  	if rsaKey, ok = key.(*rsa.PrivateKey); !ok {
  		return "", ErrInvalidKey
  	}
  
  	// Create the hasher
  	if !m.Hash.Available() {
  		return "", ErrHashUnavailable
  	}
  
  	hasher := m.Hash.New()
  	hasher.Write([]byte(signingString))
  
  	// Sign the string and return the encoded bytes
  	if sigBytes, err := rsa.SignPKCS1v15(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil)); err == nil {
  		return EncodeSegment(sigBytes), nil
  	} else {
  		return "", err
  	}
  }
docs: // Implements the Sign method from SigningMethod
  // For this signing method, must be an *rsa.PrivateKey structure.