HEX
Server: Apache
System: Linux 185.122.168.184.host.secureserver.net 5.14.0-570.60.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Nov 5 05:00:59 EST 2025 x86_64
User: barbeatleanalyti (1024)
PHP: 8.1.33
Disabled: NONE
Upload Files
File: //var/opt/nydus/ops/cryptography/__pycache__/utils.cpython-39.pyc
a

�,�h��@s�ddlZddlZddlZddlZddlZddlZddlZGdd�de�ZeZ	eZ
eZeZe
edd�dd�Ze
edd�dd�Zejr�dd	lmZejd
ed�ZGdd
�d
e�Zejd
d�dd�Zd*eejeed�dd�ZGdd�de�Zejejd�dd�Z dd�eje!e"d�dd�Z#Gdd�d�Z$Gd d!�d!ej%�Z&d+e!e
e
ej'e(eje
e$d"�d#d$�Z)ej*e+d%�d&d'�Z,Gd(d)�d)ej-�Z-dS),�Nc@seZdZdS)�CryptographyDeprecationWarningN��__name__�
__module__�__qualname__�rr�E/opt/nydus/tmp/pip-target-wkfpz8uv/lib64/python/cryptography/utils.pyrsr)�name�value�returncCst|t�std�|���dS)Nz{} must be bytes)�
isinstance�bytes�	TypeError�format�r	r
rrr�_check_bytess
rcCs2zt|�Wn ty,td�|���Yn0dS)Nz{} must be bytes-like)�
memoryviewrrrrrr�_check_byteslike#sr)�Protocol�_T_class)�boundc@s$eZdZdd�eeed�dd�ZdS)�_RegisterDecoratorTypeF��check_annotations��klassrrcCsdS�Nr)�selfrrrrr�__call__0sz_RegisterDecoratorType.__call__N)rrrr�boolrrrrrr/s
��r)�ifacercs dd�dtdd��fdd�}|S)NFrrrcst�||d���|�|S)Nr)�verify_interface�register)rr�r rr�register_decorator7s
z.register_interface.<locals>.register_decorator)r)r r$rr#r�register_interface6s��r%)�integer�lengthrcCs |�|p|��ddpdd�S)N����big)�to_bytes�
bit_length)r&r'rrr�int_to_bytesAs�r.c@seZdZdS)�InterfaceNotImplementedNrrrrrr/Gsr/)�	signaturercCst�dd�|j��D��S)NcSsg|]}|jtjjd��qS))�
annotation)�replace�inspect�	Parameter�empty)�.0�paramrrr�
<listcomp>Ms�z$strip_annotation.<locals>.<listcomp>)r3�	Signature�
parameters�values)r0rrr�strip_annotationKs
��r<Fr)r rrcCs�|jD]�}t||�s$td�||���tt||�tj�r8qt�	t||��}t�	t||��}|rf||k}nt
|�t
|�k}|std�||||���qdS)Nz{} is missing a {!r} methodzK{}.{}'s signature differs from the expected. Expected: {!r}. Received: {!r})�__abstractmethods__�hasattrr/rr�getattr�abc�abstractpropertyr3r0r<)r rr�method�sig�actual�okrrrr!Ts$


�
��r!c@seZdZeed�dd�ZdS)�_DeprecatedValue)r
�messagecCs||_||_||_dSr)r
rG�
warning_class)rr
rGrHrrr�__init__msz_DeprecatedValue.__init__N)rrr�object�strrIrrrrrFlsrFcsjeZdZejd��fdd�Zeed�dd�Zeedd�d	d
�Z	edd�dd�Z
ejed
�dd�Z
�ZS)�_ModuleWithDeprecations)�modulecst��|j�||jd<dS�N�_module)�superrIr�__dict__)rrM��	__class__rrrItsz _ModuleWithDeprecations.__init__)�attrrcCs4t|j|�}t|t�r0tj|j|jdd�|j}|S�N�)�
stacklevel)	r?rOrrF�warnings�warnrGrHr
�rrT�objrrr�__getattr__xs

z#_ModuleWithDeprecations.__getattr__N)rTr
rcCst|j||�dSr)�setattrrO)rrTr
rrr�__setattr__sz#_ModuleWithDeprecations.__setattr__cCs:t|j|�}t|t�r*tj|j|jdd�t|j|�dSrU)	r?rOrrFrXrYrGrH�delattrrZrrr�__delattr__�s
z#_ModuleWithDeprecations.__delattr__�rcCsdgt|j�SrN)�dirrO�rrrr�__dir__�sz_ModuleWithDeprecations.__dir__)rrr�types�
ModuleTyperIrKrJr\r^r`�typing�Sequencerd�
__classcell__rrrRrrLss
rL)r
�module_namerGrHr	rcCsJtj|}t|t�s&t|�tj|<}t|||�}|durFt|||�|Sr)�sys�modulesrrLrFr])r
rjrGrHr	rMZdvrrr�
deprecated�s

rm)�funcrcs.d����t��td����fdd�}t|�S)Nz
_cached_{})�instancecs0t|���}|�ur|S�|�}t|�|�|Sr)r?r])ro�cache�result�Zcached_namern�sentinelrr�inner�szcached_property.<locals>.inner)rrJ�property)rnrtrrrr�cached_property�s
rvc@s(eZdZed�dd�Zed�dd�ZdS)�EnumracCs d|jj�d|j�d|j�d�S)N�<�.z: �>)rSr�_name_�_value_rcrrr�__repr__�sz
Enum.__repr__cCs|jj�d|j��S)Nry)rSrr{rcrrr�__str__�szEnum.__str__N)rrrrKr}r~rrrrrw�srw)N)N).r@�enumr3rkrergrX�UserWarningrZPersistentlyDeprecated2019ZDeprecatedIn35ZDeprecatedIn36ZDeprecatedIn37rKr
rr�
TYPE_CHECKINGZtyping_extensionsr�TypeVar�typerr�ABCMetar%�int�Optionalr.�	Exceptionr/r9r<rJrr!rFrfrL�Type�Warningrm�Callablerurvrwrrrr�<module>sL
����