https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/cryptography/hazmat/primitives/kdf/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/cryptography/hazmat/primitives/kdf/__pycache__/x963kdf.cpython-310.pyc
o

�)%a�	�@s�ddlZddlZddlmZddlmZmZmZmZddl	m
Z
ddlmZddl
mZmZddlmZdd	�ZGd
d�de�ZdS)�N)�utils)�AlreadyFinalized�
InvalidKey�UnsupportedAlgorithm�_Reasons)�_get_backend)�HashBackend)�
constant_time�hashes)�KeyDerivationFunctioncCst�d|�S)Nz>I)�struct�pack)�n�r�L/usr/lib/python3/dist-packages/cryptography/hazmat/primitives/kdf/x963kdf.py�
_int_to_u32besrc@sVeZdZ	ddejdedejefdd�Z	dedefd	d
�Z
dededdfdd
�ZdS)�X963KDFN�	algorithm�length�
sharedinfocCstt|�}|jd}||krtd�|���|durt�d|�||_||_||_t	|t
�s2tdtj
��||_d|_dS)Nl��z(Can not derive keys larger than {} bits.rz.Backend object does not implement HashBackend.F)r�digest_size�
ValueError�formatr�_check_bytes�
_algorithm�_length�_sharedinfo�
isinstancerrr�BACKEND_MISSING_INTERFACE�_backend�_used)�selfrrr�backend�max_lenrrr�__init__s$
�
�
zX963KDF.__init__�key_material�returncCs�|jrt�d|_t�d|�dg}d}d}|j|krQt�|j|j�}|�	|�|�	t
|��|jdur9|�	|j�|�|�
��|t|d�7}|d7}|j|ksd�|�d|j�S)NTr%�r����)r rr�_check_byteslikerr
�Hashrr�updaterr�append�finalize�len�join)r!r%�output�outlen�counter�hrrr�derive8s$



�
zX963KDF.derive�expected_keycCst�|�|�|�st�dS�N)r	�bytes_eqr5r)r!r%r6rrr�verifyMs�zX963KDF.verifyr7)�__name__�
__module__�__qualname__r
�
HashAlgorithm�int�typing�Optional�bytesr$r5r9rrrrrs���
�r)rr?�cryptographyr�cryptography.exceptionsrrrr�cryptography.hazmat.backendsr�'cryptography.hazmat.backends.interfacesr�cryptography.hazmat.primitivesr	r
�"cryptography.hazmat.primitives.kdfrrrrrrr�<module>s

https://t.me/RX1948 - 2025