ffjddlmZddlmZmZmZmZmZmZm Z m Z ddl m Z Gdde ZddZdS) )bord)load_pycryptodome_raw_lib VoidPointer SmartPointercreate_string_bufferget_raw_bufferc_size_t c_uint8_ptrc_ubyte)_raw_keccak_libc2eZdZdZdZddZdZdZddZdS) SHAKE128_XOFzA SHAKE128 hash object. Do not instantiate directly. Use the :func:`new` function. :ivar oid: ASN.1 Object ID :vartype oid: string z2.16.840.1.101.3.4.2.11Nc~t}tj|t dt d}|rt d|zt|tj |_ d|_ d|_ |r| |dSdS)N z%Error %d while instantiating SHAKE128F)rr keccak_init address_ofr r ValueErrorrgetkeccak_destroy_state _is_squeezing_paddingupdate)selfdatastateresults v/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/SHAKE128.py__init__zSHAKE128_XOF.__init__5s  ,U-=-=-?-?-5b\\-4R[[::  'D%&'' '"599;;#2#ACC "   KK       c |jrtdtj|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. z/You cannot call 'update' after the first 'read'z&Error %d while updating SHAKE128 state) r TypeErrorr keccak_absorbrrr r lenr)rrrs r rzSHAKE128_XOF.updateDs   OMNN N .t{/@/@/:4/@/@/7D /B/BDD  'E%&'' ' r"cd|_t|}tj|j|t |t|j}|rtd|zt|S)ah Compute the next piece of XOF output. .. note:: You cannot use :meth:`update` anymore after the first call to :meth:`read`. Args: length (integer): the amount of bytes this method must return :return: the next piece of XOF output (of the given length) :rtype: byte string Tz'Error %d while extracting from SHAKE128) rrr keccak_squeezerrr r rrr)rlengthbfrrs r readzSHAKE128_XOF.readVs""6** / 0A0A03080@0@07 0F0FHH  'F%&'' 'c"""r"c4t||S)Nr)type)rrs r newzSHAKE128_XOF.newqstDzzt$$$$r"N) __name__ __module__ __qualname____doc__oidr!rr+r/r"r rr)sk $C    $###6%%%%%%r"rNc"t|S)aReturn a fresh instance of a SHAKE128 object. Args: data (bytes/bytearray/memoryview): The very first chunk of the message to hash. It is equivalent to an early call to :meth:`update`. Optional. :Return: A :class:`SHAKE128_XOF` object r-)rr-s r r/r/us T " " ""r"r0)Crypto.Util.py3compatrCrypto.Util._raw_apirrrrrr r r Crypto.Hash.keccakr objectrr/r6r"r r<s>'&&&&&88888888888888888888 /.....I%I%I%I%I%6I%I%I%X # # # # # #r"