HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //lib64/python3.9/site-packages/cryptography/hazmat/primitives/__pycache__/keywrap.cpython-39.pyc
a

�au�@s�ddlZddlZddlmZddlmZddlmZddlm	Z	e
e
eje
e
d�dd�Zde
e
ej
e
d	�d
d�Ze
e
eje
eje
eje
fd�dd
�Zde
e
ej
e
d	�dd�Zde
e
ej
e
d�dd�Zde
e
ej
e
d�dd�ZGdd�de�ZdS)�N)�Cipher)�AES)�ECB)�bytes_eq)�wrapping_key�a�r�returncCs�tt|�t����}t|�}td�D]d}t|�D]V}|�|||�}t�dt�	d|dd��d|||dA�}|dd�||<q0q$|�
�dks�J�|d�|�S)N��>Q�r�����)rrr�	encryptor�len�range�update�struct�pack�unpack�finalize�join)rrrr�n�j�i�b�r�L/usr/lib64/python3.9/site-packages/cryptography/hazmat/primitives/keywrap.py�
_wrap_cores(�r)r�key_to_wrap�backendr	csnt|�dvrtd��t��dkr(td��t��ddkr@td��d}�fd	d
�tdt��d�D�}t|||�S)N���� �/The wrapping key must be a valid AES key lengthr#z)The key to wrap must be at least 16 bytesrrz-The key to wrap must be a multiple of 8 bytes���������csg|]}�||d��qS�rr��.0r�r rr�
<listcomp>7rz aes_key_wrap.<locals>.<listcomp>)r�
ValueErrorrr)rr r!rrrr+r�aes_key_wrap(sr.c		Cs�tt|�t����}t|�}ttd��D]l}tt|��D]Z}t�dt�	d|�d|||dA�||}|�
|�}|dd�}|dd�||<q8q(|��dks�J�||fS)Nr
rrr
rrr)rrr�	decryptorr�reversedrrrrrr)	rrrr/rrrZatrrrrr�_unwrap_core;s ���
r1cs�t|�dvrtd��dt�dt���}dt��dd}�d|�t��dkr�tt|�t����}|�|��}|�	�dks�J�|S�fdd	�t
d
t��d�D�}t|||�SdS)Nr"r&��YY�z>ir�rcsg|]}�||d��qSr(rr)r+rrr,irz-aes_key_wrap_with_padding.<locals>.<listcomp>r)rr-rrrrrrrrrr)rr r!�aivZpadrrrrr+r�aes_key_wrap_with_paddingVsr5)r�wrapped_keyr!r	csrt��dkrtd��t|�dvr(td��t��dkr�tt|�t����}|���}|��dksbJ�|dd�}|dd�}d}nJ�fdd	�t	d
t��d�D�}|�
d
�}	t|�}t||	|�\}}d�|�}t
�d|dd��\}
d||
}t|dd�d
��rLd|d|
k�r$d|k�rLnn$|d
k�rRt||d�d|��sRt��|d
k�r`|S|d|�SdS)Nr#zMust be at least 16 bytesr"r&rrr
csg|]}�||d��qSr(rr)�r6rrr,�rz/aes_key_unwrap_with_padding.<locals>.<listcomp>rz>I�r2r3)r�
InvalidUnwrapr-rrrr/rrr�popr1rrrr)rr6r!r/rr�datarrZ
encrypted_aivZmlirr7r�aes_key_unwrap_with_paddingms@


��
���
r<cs�t��dkrtd��t��ddkr,td��t|�dvr@td��d}�fd	d
�tdt��d�D�}|�d�}t|||�\}}t||�s�t��d�|�S)Nr$zMust be at least 24 bytesrrz-The wrapped key must be a multiple of 8 bytesr"r&r'csg|]}�||d��qSr(rr)r7rrr,�rz"aes_key_unwrap.<locals>.<listcomp>r)rr9r-rr:r1rr)rr6r!r4rrrr7r�aes_key_unwrap�s

r=c@seZdZdS)r9N)�__name__�
__module__�__qualname__rrrrr9�sr9)N)N)N)N)r�typingZ&cryptography.hazmat.primitives.ciphersrZ1cryptography.hazmat.primitives.ciphers.algorithmsrZ,cryptography.hazmat.primitives.ciphers.modesrZ,cryptography.hazmat.primitives.constant_timer�bytes�Listr�Anyr.�Tupler1r5r<r=�	Exceptionr9rrrr�<module>sX��������1��