HEX
Server: LiteSpeed
System: Linux s787.bom1.mysecurecloudhost.com 4.18.0-477.13.1.lve.el8.x86_64 #1 SMP Thu Jun 1 16:40:47 EDT 2023 x86_64
User: mobilech (5348)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/cryptography/__pycache__/utils.cpython-310.pyc
o

;j�@sddlmZddlZddlZddlZddlZddlZddlmZm	Z	Gdd�de
�ZeZeZ
eZeZeZeZejdkrDejeeefZnejZd-d
d�Zd.dd�Zd/d0dd�ZGdd�de�ZGdd�d�ZGdd�dej�Z 	d/d1d$d%�Z!d2d)d*�Z"Gd+d,�d,ej#�Z#dS)3�)�annotationsN)�Callable�Sequencec@�eZdZdS)�CryptographyDeprecationWarningN��__name__�
__module__�__qualname__�rr�F/opt/saltstack/salt/lib/python3.10/site-packages/cryptography/utils.pyr�r)��	�name�str�value�bytes�return�NonecCst|t�st|�d���dS)Nz must be bytes)�
isinstancer�	TypeError�rrrrr�_check_bytes*s
�r�BuffercCs,zt|�WdStyt|�d���w)Nz must be bytes-like)�
memoryviewrrrrr�_check_byteslike/s
�r�integer�int�length�
int | NonecCs0|dkrtd��|�|p|��ddpdd�S)Nrzlength argument can't be 0����big)�
ValueError�to_bytes�
bit_length)rrrrr�int_to_bytes6s
�r(c@r)�InterfaceNotImplementedNrrrrrr)>r
r)c@seZdZddd�ZdS)	�_DeprecatedValuer�object�messagercCs||_||_||_dS�N)rr,�
warning_class)�selfrr,r.rrr�__init__Cs
z_DeprecatedValue.__init__N)rr+r,r)rr	r
r0rrrrr*Bsr*csFeZdZd�fdd�Zdd	d
�Zddd�Zddd�Zddd�Z�ZS)�_ModuleWithDeprecations�module�types.ModuleTypecst��|j�||jd<dS�N�_module)�superr0r�__dict__)r/r2��	__class__rrr0Jsz _ModuleWithDeprecations.__init__rrr�
typing.AnycCs4t|j|�}t|t�rtj|j|jdd�|j}|S�N�)�
stacklevel)	�getattrr5rr*�warnings�warnr,r.r)r/r�objrrr�__getattr__Ns

z#_ModuleWithDeprecations.__getattr__�attrrr+rcCst|j||�dSr-)�setattrr5)r/rCrrrr�__setattr__Usz#_ModuleWithDeprecations.__setattr__cCs:t|j|�}t|t�rtj|j|jdd�t|j|�dSr;)	r>r5rr*r?r@r,r.�delattr)r/rCrArrr�__delattr__Xs
z#_ModuleWithDeprecations.__delattr__�
Sequence[str]cCsdgt|j��Sr4)�dirr5�r/rrr�__dir___sz_ModuleWithDeprecations.__dir__)r2r3)rrrr:)rCrrr+rr)rCrrr)rrH)	rr	r
r0rBrErGrK�
__classcell__rrr8rr1Is


r1r+�module_namer,r.�
type[Warning]�
str | NonecCsJtj|}t|t�st|�tj|<}t|||�}|dur#t|||�|Sr-)�sys�modulesrr1r*rD)rrMr,r.rr2Zdvrrr�
deprecatedcs

rR�funcr�propertycs*d����t��d���fdd�}t|�S)NZ_cached_�instancer+cs0t|���}|�ur|S�|�}t|�|�|Sr-)r>rD)rU�cache�result�Zcached_namerS�sentinelrr�innerxszcached_property.<locals>.inner)rUr+)r+rT)rSrZrrXr�cached_propertyts
r[c@s eZdZddd�Zddd�ZdS)	�EnumrrcCs d|jj�d|j�d|j�d�S)N�<�.z: �>)r9r�_name_�_value_rJrrr�__repr__�s z
Enum.__repr__cCs|jj�d|j��S)Nr^)r9rr`rJrrr�__str__�szEnum.__str__N)rr)rr	r
rbrcrrrrr\�s
r\)rrrrrr)rrrrrrr-)rrrr rr)rr+rMrr,rr.rNrrOrr*)rSrrrT)$�
__future__r�enumrP�types�typingr?�collections.abcrr�UserWarningrZDeprecatedIn36ZDeprecatedIn40ZDeprecatedIn41ZDeprecatedIn42ZDeprecatedIn43ZDeprecatedIn47�version_info�Unionr�	bytearrayrr�
ByteStringrrr(�	Exceptionr)r*�
ModuleTyper1rRr[r\rrrr�<module>s6


�