Viewing File: /opt/imunify360/venv/lib/python3.11/site-packages/Crypto/Hash/__pycache__/keccak.cpython-311.pyc



]jwtddlmZddlmZmZmZmZmZmZm	Z	m
Z
eddZGddeZ
dZdS)	bord)load_pycryptodome_raw_libVoidPointerSmartPointercreate_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);
                        c0eZdZdZdZdZdZdZdZdS)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|jdztd}|rtd|zt|t
j
|_|r||dSdS)NFz#Error %d while instantiating keccak)digest_size_update_after_digest_digest_done_paddingr_raw_keccak_libkeccak_init
address_ofr
r
ValueErrorrgetkeccak_destroy_stateupdate)selfdatadigest_bytesupdate_after_digeststateresults      t/builddir/build/BUILD/imunify360-venv-2.6.3/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/keccak.py__init__zKeccak_Hash.__init__Es'$7!!


 ,,U-=-=-?-?-5d6F6J-K-K-4R[[::	MBVKLLL"599;;#2#ACC	KK		c	|jr|jstdt|jt|tt|}|rtd|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)rr	TypeErrorr
keccak_absorbrrrr
lenr)rr r$s   r%rzKeccak_Hash.updateXs	XT%>	XVWWW ..t{/@/@/:4/@/@/7D		/B/BDD	H=FGGGr'c.d|_t|j}t|j|t|jt|j	}|rtd|zt|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)rrrr
keccak_digestrrr
rrrr	)rbfrr$s   r%digestzKeccak_Hash.digestis!"4#344 ..t{/@/@/2/78H/I/I/6t}/E/EGG	I>GHHHc"""r'cddd|DS)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
        c2g|]}dt|zS)z%02xr).0xs  r%
<listcomp>z)Keccak_Hash.hexdigest.<locals>.<listcomp>s#@@@Qa(@@@r')joinr/)rs r%	hexdigestzKeccak_Hash.hexdigest|s-ww@@$++--@@@AAAr'c>d|vrd|vr
|j|d<tdi|S)z"Create a fresh Keccak hash object.r!digest_bits)rnew)rkwargss  r%r;zKeccak_Hash.news6''M,G,G%)%5F>"}}V}}r'N)	__name__
__module____qualname____doc__r&rr/r7r;r:r'r%rr<sl&"###&BBBr'rc|dd}|dd}|dd}|dd}d||fvrtdd||fkrtd	||d
vrtdn|dvrtd
|dz}|rtdt|zt	|||S)aoCreate a new hash object.

    Args:
        data (bytes/bytearray/memoryview):
            The very first chunk of the message to hash.
            It is equivalent to an early call to :meth:`Keccak_Hash.update`.
        digest_bytes (integer):
            The size of the digest, in bytes (28, 32, 48, 64).
        digest_bits (integer):
            The size of the digest, in bits (224, 256, 384, 512).
        update_after_digest (boolean):
            Whether :meth:`Keccak.digest` can be followed by another
            :meth:`Keccak.update` (default: ``False``).

    :Return: A :class:`Keccak_Hash` hash object
    r Nr"Fr!r9z*Only one digest parameter must be provided)NNz&Digest size (bits, bytes) not provided) 0@z('digest_bytes' must be: 28, 32, 48 or 64)iiz,'digest_bytes' must be: 224, 256, 384 or 512zUnknown parameters: )popr)rstrr)r<r r"r!r9s     r%r;r;s$::fd##D **%:EBB::nd33L**]D11KL+...DEEEk222@AAA///GHHH0222KLLL"a'
>.V<===t\+>???r'N)Crypto.Util.py3compatrCrypto.Util._raw_apirrrrr	r
rrrobjectrr;r:r'r%<module>rNs>'&&&&&88888888888888888888,+,A*PPPPP&PPPf&@&@&@&@&@r'
Back to Directory File Manager