AnonSec Shell
Server IP : 209.38.156.173  /  Your IP : 216.73.216.122   [ Reverse IP ]
Web Server : Apache/2.4.52 (Ubuntu)
System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64
User : root ( 0)
PHP Version : 8.1.2-1ubuntu2.22
Disable Function : NONE
Domains : 2 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/cryptography/hazmat/backends/openssl/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /lib/python3/dist-packages/cryptography/hazmat/backends/openssl/__pycache__/ciphers.cpython-310.pyc
o

g�e$�@s|ddlmZddlmZmZmZddlmZddlm	Z	e�
ej�e�
ej�e�
ej
�e�
ej�Gdd�de�����ZdS)�)�utils)�
InvalidTag�UnsupportedAlgorithm�_Reasons)�ciphers)�modesc@s�eZdZdZdZdZdd�Zdedefdd	�Zdede	fd
d�Z
defdd
�Zdedefdd�Zdeddfdd�Z
e�d�ZdS)�_CipherContext�ri���?cCs�||_||_||_||_d|_t|jtj�r|jjd|_	nd|_	|jj
��}|jj�
||jj
j�}|jj}z|t|�t|�f}WntyYtd�|j|rS|jn|�tj��w||j||�}||jjjkr�d�|�}	|durx|	d�|�7}	|	d�|j���7}	t|	tj��t|tj�r�|jj�|j�}
n2t|tj�r�|jj�|j�}
n#t|tj�r�|jj�|j �}
nt|tj�r�|jj�|j �}
n|jjj}
|jj
�!|||jjj|jjj|jjj|�}|j�"|dk�|jj
�#|t$|j%��}|j�"|dk�t|tj&��r=|jj
�'||jj
j(t$|
�|jjj�}|j�"|dk�|j)du�r=|jj
�'||jj
j*t$|j)�|j)�}|j�"|dk�|j)|_|jj
�!||jjj|jjj|jj�|j%�|
|�}|j�"|dk�|jj
�+|d�||_,dS)N�r	z6cipher {} in {} mode is not supported by this backend.zcipher {0.name} zin {0.name} mode z_is not supported by this backend (Your version of OpenSSL may be too old. Current version: {}.)r)-�_backend�_cipher�_mode�
_operation�_tag�
isinstancer�BlockCipherAlgorithm�
block_size�_block_size_bytes�_lib�EVP_CIPHER_CTX_new�_ffi�gc�EVP_CIPHER_CTX_free�_cipher_registry�type�KeyErrorr�format�namer�UNSUPPORTED_CIPHER�NULL�openssl_version_textr�ModeWithInitializationVector�from_buffer�initialization_vector�
ModeWithTweak�tweak�
ModeWithNonce�nonce�EVP_CipherInit_ex�openssl_assert�EVP_CIPHER_CTX_set_key_length�len�key�GCM�EVP_CIPHER_CTX_ctrl�EVP_CTRL_AEAD_SET_IVLEN�tag�EVP_CTRL_AEAD_SET_TAG�EVP_CIPHER_CTX_set_padding�_ctx)�self�backend�cipher�mode�	operation�ctx�registry�adapter�
evp_cipher�msg�iv_nonce�res�r@�N/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/ciphers.py�__init__s�
����	
��
�
����
z_CipherContext.__init__�data�returncCs2tt|�|jd�}|�||�}t|d|��S)Nr	)�	bytearrayr+r�update_into�bytes)r4rC�buf�nr@r@rA�updateysz_CipherContext.updatec
Cs�t|�}t|�||jdkrtd�t|�|jd���d}d}|jj�d�}|jjj|dd�}|jj�|�}||kr}||}	||}
t|j	||�}|jj
�|j|	||
|�}|dkrgt
|jtj�rgtd��|j�|dk�||7}||d7}||ks<|S)Nr	z1buffer must be at least {} bytes for this payloadr�int *T)�require_writablezeIn XTS mode you must supply at least a full block in the first update call. For AES this is 16 bytes.)r+r�
ValueErrorrrr�newr"�min�_MAX_CHUNK_SIZEr�EVP_CipherUpdater3rr
r�XTSr))
r4rCrH�total_data_len�data_processed�	total_out�outlen�
baseoutbuf�	baseinbuf�outbuf�inbuf�inlenr?r@r@rArF~s6����z_CipherContext.update_intocCs�|j|jkrt|jtj�r|jdurtd��|jj	�
d|j�}|jj	�
d�}|jj�
|j||�}|dkro|j��}|sDt|jtj�rDt�|jj|d�|jjj|jjj�pg|jjjog|d�|jjj|jjj�|d�td��t|jtj�r�|j|jkr�|jj	�
d|j�}|jj�|j|jjj|j|�}|j�|dk�|jj	�|�dd�|_|jj�|j�}|j�|dk�|jj	�|�d|d�S)Nz4Authentication tag must be provided when decrypting.zunsigned char[]rKr)�errorszFThe length of the provided data is not a multiple of the block length.r	)r�_DECRYPTrr
r�ModeWithAuthenticationTagr0rMrrrNrr�EVP_CipherFinal_exr3�_consume_errorsr-rr)�_lib_reason_match�ERR_LIB_EVP�'EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH�Cryptography_HAS_PROVIDERS�ERR_LIB_PROV�PROV_R_WRONG_FINAL_BLOCK_LENGTH�_ENCRYPTr.�EVP_CTRL_AEAD_GET_TAG�bufferr�EVP_CIPHER_CTX_reset)r4rHrVr?r\�tag_bufr@r@rA�finalize�sb
����
�
����
���z_CipherContext.finalizer0cCs`t|�|jjkrtd�|jj���|jj�|j|jjj	t|�|�}|j�
|dk�||_|��S)Nz.Authentication tag must be {} bytes or longer.r)
r+r
�_min_tag_lengthrMrrrr.r3r1r)rrl)r4r0r?r@r@rA�finalize_with_tag�s���z _CipherContext.finalize_with_tagNcCsN|jj�d�}|jj�|j|jjj||jj�|�t|��}|j�	|dk�dS)NrKr)
rrrNrrQr3rr"r+r))r4rCrVr?r@r@rA�authenticate_additional_data�s�z+_CipherContext.authenticate_additional_datar)�__name__�
__module__�__qualname__rgr]rPrBrGrJ�intrFrlrnror�read_only_propertyr0r@r@r@rArsd":rN)�cryptographyr�cryptography.exceptionsrrr�cryptography.hazmat.primitivesr�&cryptography.hazmat.primitives.ciphersr�register_interface�
CipherContext�AEADCipherContext�AEADEncryptionContext�AEADDecryptionContext�objectrr@r@r@rA�<module>s





Anon7 - 2022
AnonSec Team