Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Cipher/__pycache__/ARC2.cpython-311.pyc
]jb d Z ddlZddlmZ ddlmZ ddlmZmZm Z m
Z
mZ edd Zd Z
d Zd
ZdZdZd
ZdZdZdZdZ ed
d ZdS )a
Module's constants for the modes of operation supported with ARC2:
: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_libVoidPointerSmartPointerc_size_tc_uint8_ptrzCrypto.Cipher._raw_arc2a?
int ARC2_start_operation(const uint8_t key[],
size_t key_len,
size_t effective_key_len,
void **pResult);
int ARC2_encrypt(const void *state,
const uint8_t *in,
uint8_t *out,
size_t data_len);
int ARC2_decrypt(const void *state,
const uint8_t *in,
uint8_t *out,
size_t data_len);
int ARC2_stop_operation(void *state);
c | d }n# t $ r t d w xY w| dd }t | t vrt dt | z d|cxk rdk sn t d|z t j }t j }t } |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.keyzMissing 'key' parametereffective_keyleni z$Incorrect ARC2 key length (%d bytes)( zH'effective_key_len' must be at least 40 and no larger than 1024 (not %d)z,Error %X while instantiating the ARC2 cipher)popKeyError TypeErrorlenkey_size
ValueError
_raw_arc2_libARC2_start_operationARC2_stop_operationr r r
address_ofr get)dict_parametersr r start_operationstop_operationcipherresults t/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Cipher/ARC2.py_create_base_cipherr >