code: def _build_signature(self):
          
          sig_contents = \
              self.payload + "." + \
              b64encode(b"application/xml").decode("ascii") + "." + \
              b64encode(b"base64url").decode("ascii") + "." + \
              b64encode(b"RSA-SHA256").decode("ascii")
          sig_hash = SHA256.new(sig_contents.encode("ascii"))
          cipher = PKCS1_v1_5.new(self.private_key)
          sig = urlsafe_b64encode(cipher.sign(sig_hash))
          key_id = urlsafe_b64encode(bytes(self.author_handle, encoding="utf-8"))
          return sig, key_id
docs: Create the signature using the private key.