" t d dl mZ d dlmZmZmZmZmZmZm Z m
Z
edd Z G d de Z
d ZdS ) bord)load_pycryptodome_raw_libVoidPointerSmartPointercreate_string_bufferget_raw_bufferc_size_tc_uint8_ptrc_ubytezCrypto.Hash._keccaka
int keccak_init(void **state,
size_t capacity_bytes,
uint8_t rounds);
int keccak_destroy(void *state);
int keccak_absorb(void *state,
const uint8_t *in,
size_t len);
int keccak_squeeze(const void *state,
uint8_t *out,
size_t len,
uint8_t padding);
int keccak_digest(void *state,
uint8_t *digest,
size_t len,
uint8_t padding);
int keccak_copy(const void *src, void *dst);
int keccak_reset(void *state);
c 0 e Zd ZdZd Zd Zd Zd Zd ZdS )Keccak_HashzA Keccak hash object.
Do not instantiate directly.
Use the :func:`new` function.
:ivar digest_size: the size in bytes of the resulting hash
:vartype digest_size: integer
c || _ || _ d| _ d| _ t }t
| t | j dz t d }|rt d|z t | t
j
| _ |r| | d S d S )NF z#Error %d while instantiating keccak)digest_size_update_after_digest_digest_done_paddingr _raw_keccak_libkeccak_init
address_ofr
r
ValueErrorr getkeccak_destroy_stateupdate)selfdatadigest_bytesupdate_after_digeststateresults t/builddir/build/BUILD/imunify360-venv-2.6.2/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/keccak.py__init__zKeccak_Hash.__init__E s '$7!!
,,U-=-=-?-?-5d6F6J-K-K-4R[[: : MBVKLLL"599;;#2#AC C KK c | j r| j st d t | j t | t t | }|rt d|z | S )zContinue hashing of a message by consuming the next chunk of data.
Args:
data (byte string/byte array/memoryview): The next chunk of the message being hashed.
z8You can only call 'digest' or 'hexdigest' on this objectzError %d while updating keccak)r r TypeErrorr
keccak_absorbr r r r
lenr )r r r$ s r% r zKeccak_Hash.updateX s XT%> XVWWW ..t{/@/@/:4/@/@/7D /B/BD D H=FGGGr' c . d| _ t | j }t | j |t | j t | j }|rt d|z t | S )zReturn the **binary** (non-printable) digest of the message that has been hashed so far.
:return: The hash digest, computed over the data processed so far.
Binary form.
:rtype: byte string
TzError %d while squeezing keccak)r r r r
keccak_digestr r r
r r r r )r bfrr$ s r% digestzKeccak_Hash.digesti s !"4#344 ..t{/@/@/2/78H/I/I/6t}/E/EG G I>GHHHc"""r' c d d d | D S )zReturn the **printable** digest of the message that has been hashed so far.
:return: The hash digest, computed over the data processed so far.
Hexadecimal encoded.
:rtype: string
c 2 g | ]}d t | z S )z%02xr ).0xs r%