code: func Encode(header *Header, c *ClaimSet, signature *rsa.PrivateKey) (string, error) {
  	head, err := header.encode()
  	if err != nil {
  		return "", err
  	}
  	cs, err := c.encode()
  	if err != nil {
  		return "", err
  	}
  	ss := fmt.Sprintf("%s.%s", head, cs)
  	h := sha256.New()
  	h.Write([]byte(ss))
  	b, err := rsa.SignPKCS1v15(rand.Reader, signature, crypto.SHA256, h.Sum(nil))
  	if err != nil {
  		return "", err
  	}
  	sig := base64Encode(b)
  	return fmt.Sprintf("%s.%s", ss, sig), nil
  }
docs: // Encode encodes a signed JWS with provided header and claim set.