| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/josepy/__pycache__/ |
Upload File : |
a
��]�$ � @ s� d Z ddlZddlZddlZddlZddlZddlZddlm Z ddl
mZ ddl
mZ ddl
mZ ddl
mZ ddlmZmZmZ e�e�ZG d d
� d
ej�ZejG dd� de��ZejG d
d� de��ZejG dd� de��ZdS )�
JSON Web Key.� N)�default_backend)�hashes)�
serialization)�ec)�rsa)�errors� json_util�utilc @ sd e Zd ZdZdZi ZdZeZdddd�Z e
jfdd �Ze
jd
d� �Zeddd
��Zeddd��ZdS )�JWKr Zkty� N)�,�:T)�indentZ
separatorsZ sort_keysc sT t j|� t� d�}|�tjt� fdd�t�� � � �D ��fi � j
���� � |�� S )zgCompute JWK Thumbprint.
https://tools.ietf.org/html/rfc7638
:returns: bytes
)�backendc 3 s$ | ]\}}|� j v r||fV qd S �N)�required)�.0�k�v��selfr �,/usr/lib/python3/dist-packages/josepy/jwk.py� <genexpr>3 s
�z!JWK.thumbprint.<locals>.<genexpr>)
r ZHashr �update�json�dumps�dict�six� iteritemsZto_json�_thumbprint_json_dumps_params�encode�finalize)r Z
hash_functionZdigestr r r �
thumbprint) s ��zJWK.thumbprintc C s
t � �dS )ziGenerate JWK with public key.
For symmetric cryptosystems, this would return ``self``.
N��NotImplementedErrorr r r r �
public_key8 s zJWK.public_keyc C s� |d u rt � n|}i }tjtjfD ]N}z||||�W S tttjjfyn } z|||<