
    ¿iga                     ~    d dl Z d dlmZ d dlmZmZmZmZmZm	Z	  edd          Z
d Zd ZdZd	Z ed d
          ZdS )    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          dt          |          z             d}~ww xY w|                      dd          }t	          |          t
          vrt          dt	          |          z            t          j        }t          j	        }t                      } |t          |          t          t	          |                    t          |          t          t	          |                    t          |          t          t          |                    |                                          }	|	rt          d	|	z            t!          |                                |          S )
zThis method instantiates and returns a smart pointer to
    a low-level base cipher. It will absorb named parameters in
    the process.keysaltcostzMissing 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
             Z/var/www/html/afkarena/venv/lib/python3.11/site-packages/Cryptodome/Cipher/_EKSBlowfish.py_create_base_cipherr#   =   s   
D!!%((""6**""6** D D D9CFFBCCCD  400F
3xxxFSQRRR'CO&AN]]F_[--%c#hh//(..%c$ii00#D\\#CKK00#..002 2F  #N!" # # 	#

n555s   ?A 
A0A++A0c                 V    |||d}t          t          j        t                   | |fi |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"   newr*   ^   s4    8 4&::F#+h/dEEfEEE          I   )r%   Cryptodome.Cipherr   Cryptodome.Util._raw_apir   r   r   r   r   r	   r   r#   r*   MODE_ECB
block_sizeranger    r+   r"   <module>r5      s   > 


 , , , , , ,7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 7 .-,	
 
 .6 6 6BF F F@  
5Fr+   