Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/Cryptodome/Cipher/__pycache__/DES.cpython-39.pyc
Ðазад
a c�hK � @ s� d Z ddlZddlmZ ddlmZ ddlmZmZm Z m Z mZ edd�Zdd � Z d d� ZdZd ZdZdZdZdZdZdZdZdS )a� Module's constants for the modes of operation supported with Single DES: :var MODE_ECB: :ref:`Electronic Code Book (ECB) <ecb_mode>` :var MODE_CBC: :ref:`Cipher-Block Chaining (CBC) <cbc_mode>` :var MODE_CFB: :ref:`Cipher FeedBack (CFB) <cfb_mode>` :var MODE_OFB: :ref:`Output FeedBack (OFB) <ofb_mode>` :var MODE_CTR: :ref:`CounTer Mode (CTR) <ctr_mode>` :var MODE_OPENPGP: :ref:`OpenPGP Mode <openpgp_mode>` :var MODE_EAX: :ref:`EAX Mode <eax_mode>` � N)�_create_cipher)�byte_string)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�c_size_t�c_uint8_ptrzCryptodome.Cipher._raw_desa� int DES_start_operation(const uint8_t key[], size_t key_len, void **pResult); int DES_encrypt(const void *state, const uint8_t *in, uint8_t *out, size_t data_len); int DES_decrypt(const void *state, const uint8_t *in, uint8_t *out, size_t data_len); int DES_stop_operation(void *state); c C s� z| � d�}W n ty( td��Y n0 t|�tkrFtdt|� ��tj}tj}t � }|t |�tt|��|�� �}|r�td| ��t |�� |�S )z}This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process.�keyzMissing 'key' parameterz#Incorrect DES key length (%d bytes)z+Error %X while instantiating the DES cipher)�pop�KeyError� TypeError�len�key_size� ValueError�_raw_des_libZDES_start_operationZDES_stop_operationr r r Z address_ofr �get)Zdict_parametersr Zstart_operationZstop_operation�cipher�result� r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/Cryptodome/Cipher/DES.py�_create_base_cipher<