'Compute JWK Thumbprint.
https://tools.ietf.org/html/rfc7638
:returns bytes:'

def thumbprint(self, hash_function=hashes.SHA256):

    digest = hashes.Hash(hash_function(), backend=default_backend())
    digest.update(json.dumps(dict(((k, v) for (k, v) in six.iteritems(self.to_json()) if (k in self.required))), **self._thumbprint_json_dumps_params).encode())
    return digest.finalize()
