code: def thumbprint(self, hashalg=hashes.SHA256()):
          
  
          t = {'kty': self._params['kty']}
          for name, val in iteritems(JWKValuesRegistry[t['kty']]):
              if val.required:
                  t[name] = self._key[name]
          digest = hashes.Hash(hashalg, backend=default_backend())
          digest.update(bytes(json_encode(t).encode('utf8')))
          return base64url_encode(digest.finalize())
docs: Returns the key thumbprint as specified by RFC 7638.
  
          :param hashalg: A hash function (defaults to SHA256)