| Server IP : 217.160.0.135 / Your IP : 216.73.217.85 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3/dist-packages/Cryptodome/Cipher/__pycache__/ |
Upload File : |
�
8�tca � �~ � d dl Z d dlmZ d dlmZmZmZmZmZm Z edd� � Z
d� Zd� ZdZ
d Z ed d
� � ZdS )� N)�_create_cipher)�load_pycryptodome_raw_lib�VoidPointer�SmartPointer�c_size_t�c_uint8_ptr�c_uintz"Cryptodome.Cipher._raw_eksblowfishaa
int EKSBlowfish_start_operation(const uint8_t key[],
size_t key_len,
const uint8_t salt[16],
size_t salt_len,
unsigned cost,
unsigned invert,
void **pResult);
int EKSBlowfish_encrypt(const void *state,
const uint8_t *in,
uint8_t *out,
size_t data_len);
int EKSBlowfish_decrypt(const void *state,
const uint8_t *in,
uint8_t *out,
size_t data_len);
int EKSBlowfish_stop_operation(void *state);
c �d � | � d� � }| � d� � }| � d� � }n1# t $ r$}t dt |� � z � � �d}~ww xY w| � dd� � }t |� � t
vrt
dt |� � z � � �t j }t j }t � � } |t |� � t t |� � � � t |� � t t |� � � � t |� � t t |� � � � |� � � � � } | rt
d | z � � �t! |� � � |� � S )
z�This method instantiates and returns a smart pointer to
a low-level base cipher. It will absorb named parameters in
the process.�key�salt�costzMissing EKSBlowfish parameter: N�invertTz+Incorrect EKSBlowfish key length (%d bytes)z3Error %X while instantiating the EKSBlowfish cipher)�pop�KeyError� TypeError�str�len�key_size�
ValueError�_raw_blowfish_lib�EKSBlowfish_start_operation�EKSBlowfish_stop_operationr r r r �int�
address_ofr �get)
�dict_parametersr r r
�er �start_operation�stop_operation�void_p�results
�@/usr/lib/python3/dist-packages/Cryptodome/Cipher/_EKSBlowfish.py�_create_base_cipherr# = s� � �
D��!�!�%�(�(���"�"�6�*�*���"�"�6�*�*����� D� D� D��9�C��F�F�B�C�C�C�����D����
�
�
��4�
0�
0�F�
�3�x�x�x����F��S���Q�R�R�R�'�C�O�&�A�N�
�]�]�F�
�_�[��-�-�%�c�#�h�h�/�/�(��.�.�%�c�$�i�i�0�0�#�D�\�\�#�C��K�K�0�0�#�.�.�0�0�
2� 2�F� � #��N�!�"� #� #� #���
�
���n�5�5�5s �?A �
A0�A+�+A0c �V � |||d�}t t j t | |fi |��S )a� Create a new EKSBlowfish cipher
Args:
key (bytes, bytearray, memoryview):
The secret key to use in the symmetric cipher.
Its length can vary from 0 to 72 bytes.
mode (one of the supported ``MODE_*`` constants):
The chaining mode to use for encryption or decryption.
salt (bytes, bytearray, memoryview):
The salt that bcrypt uses to thwart rainbow table attacks
cost (integer):
The complexity factor in bcrypt
invert (bool):
If ``False``, in the inner loop use ``ExpandKey`` first over the salt
and then over the key, as defined in
the `original bcrypt specification <https://www.usenix.org/legacy/events/usenix99/provos/provos_html/node4.html>`_.
If ``True``, reverse the order, as in the first implementation of
`bcrypt` in OpenBSD.
:Return: an EKSBlowfish object
)r r
r )r �sys�modules�__name__)r �moder r
r �kwargss r"