n+ , d dl Z d dlmZ d dlmZmZmZmZmZ d dl m Z d dlmZ dZ dZdZd Zd ZdZdZd ZdZdZdZdZ ede Z dZ e j r ede dd Zn# e$ r Y nw xY wd Zd Zd Z dZ!dZ"dS ) N)_create_cipher)load_pycryptodome_raw_libVoidPointerSmartPointerc_size_tc_uint8_ptr) _cpu_features)get_random_bytes a int AES_start_operation(const uint8_t key[], size_t key_len, void **pResult); int AES_encrypt(const void *state, const uint8_t *in, uint8_t *out, size_t data_len); int AES_decrypt(const void *state, const uint8_t *in, uint8_t *out, size_t data_len); int AES_stop_operation(void *state); zCrypto.Cipher._raw_aeszCrypto.Cipher._raw_aesniAESAESNIc | dd } | d }n# t $ r t d w xY wt | t vrt dt | z |r t rt j }t j }nt j }t j }t } |t | t t | | }|rt d|z t! | | S )z}This method instantiates and returns a handle to a low-level base cipher. It will absorb named parameters in the process. use_aesniTkeyzMissing 'key' parameterz#Incorrect AES key length (%d bytes)z+Error %X while instantiating the AES cipher)popKeyError TypeErrorlenkey_size ValueError_raw_aesni_libAESNI_start_operationAESNI_stop_operation_raw_aes_libAES_start_operationAES_stop_operationr r r address_ofr get)dict_parametersr r start_operationstop_operationcipherresults s/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Cipher/AES.py_create_base_cipherr/ N s> ##K66I3!!%(( 3 3 312223 3xxx>SIJJJ 9^ 9(>'<&:%8 ]]F _[--%c#hh//#..002 2F #F!" # # # n555s . Ac ( t | dk rt d |t d }n"t | dk rt d t | dd t | }| dd ||fS )zrDerive a tuple (r, s, nonce) for a Poly1305 MAC. If nonce is ``None``, a new 16-byte nonce is generated. z(Poly1305 with AES requires a 32-byte keyN z*Poly1305 with AES requires a 16-byte nonce)r r r newMODE_ECBencrypt)r noncess r. _derive_Poly1305_key_pairr8 m s 3xx2~~CDDD} $$ Ur EFFFCHh''..Arss8Q c Z d|d<