
    ,hU                     p    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y)    N)_create_cipher)load_pycryptodome_raw_libVoidPointerSmartPointerc_size_tc_uint8_ptrc_uintzCrypto.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                    	 | j                  d      }| j                  d      }| j                  d      }| j                  dd      }t	        |      t
        vrt        dt	        |      z        t        j                  }t        j                  }t               } |t        |      t        t	        |            t        |      t        t	        |            t        |      t        t        |            |j                               }	|	rt        d	|	z        t!        |j#                         |      S # t        $ r}t        dt        |      z         d}~ww xY w)
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
             \/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/Crypto/Cipher/_EKSBlowfish.py_create_base_cipherr#   =   s3   
D!!%(""6*""6*   40F
3xxFSQRR'CCO&AAN]F[-%c#h/(.%c$i0#D\#CK0#..02F N!" # 	#

n55+  D9CFBCCDs   3D0 0	E9EEc                 T    |||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*   ^   s-    8 4&:F#++h/dEfEE          I   )r%   Crypto.Cipherr   Crypto.Util._raw_apir   r   r   r   r   r	   r   r#   r*   MODE_ECB
block_sizeranger    r+   r"   <module>r5      sS   >  (7 7 .(	
 .6BF@  
Fr+   