ff"ddlTddlmZmZmZmZmZmZmZeddZ Gdde Z d dZ e j Z e jZd ZdS) )*)load_pycryptodome_raw_lib VoidPointer SmartPointercreate_string_bufferget_raw_bufferc_size_t c_uint8_ptrzCrypto.Hash._SHA1a #define SHA1_DIGEST_SIZE 20 int SHA1_init(void **shaState); int SHA1_destroy(void *shaState); int SHA1_update(void *hs, const uint8_t *buf, size_t len); int SHA1_digest(const void *shaState, uint8_t digest[SHA1_DIGEST_SIZE]); int SHA1_copy(const void *src, void *dst); int SHA1_pbkdf2_hmac_assist(const void *inner, const void *outer, const uint8_t first_digest[SHA1_DIGEST_SIZE], uint8_t final_digest[SHA1_DIGEST_SIZE], size_t iterations); cFeZdZdZdZdZdZd dZdZdZ d Z d Z d d Z dS) SHA1HashaA SHA-1 hash object. Do not instantiate directly. Use the :func:`new` function. :ivar oid: ASN.1 Object ID :vartype oid: string :ivar block_size: the size in bytes of the internal message block, input to the compression function :vartype block_size: integer :ivar digest_size: the size in bytes of the resulting hash :vartype digest_size: integer @z 1.3.14.3.2.26Nc6t}t|}|rt d|zt |tj|_|r| |dSdS)N!Error %d while instantiating SHA1) r _raw_sha1_lib SHA1_init address_of ValueErrorrget SHA1_destroy_stateupdate)selfdatastateresults r/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/SHA1.py__init__zSHA1Hash.__init__Hs (()9)9););<<  '@%&'' '"599;;#0#=??   KK       c t|jt |t t |}|rtd|zdS)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. rN)r SHA1_updaterrr r lenr)rrrs rrzSHA1Hash.updateSsv**4;??+<+<+6t+<+<+3CII+>+>@@  '@%&'' ' ' 'rct|j}t|j|}|rt d|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 r)r digest_sizer SHA1_digestrrrr)rbfrrs rdigestzSHA1Hash.digestaso#4#344**4;??+<+<+.00  '@%&'' 'c"""rcddd|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%02x)bord).0xs r z&SHA1Hash.hexdigest..zs#@@@Qa(@@@r)joinr')rs r hexdigestzSHA1Hash.hexdigestrs-ww@@$++--@@@AAArct}t|j|j}|rt d|z|S)a4Return a copy ("clone") of the hash object. The copy will have the same internal state as the original hash object. This can be used to efficiently compute the digests of strings that share a common initial substring. :return: A hash object of the same type zError %d while copying SHA1)r r SHA1_copyrrr)rcloners rcopyz SHA1Hash.copy|sc (():):).)9)9););==  E:VCDD D rc t|S)z!Create a fresh SHA-1 hash object.)r )rrs rnewz SHA1Hash.news~~rN) __name__ __module__ __qualname____doc__r$ block_sizeoidrrr'r0r4r6rrr r 1s   KJ C     ' ' '###"BBB$rr NcDt|S)aCreate a new hash object. :parameter data: Optional. The very first chunk of the message to hash. It is equivalent to an early call to :meth:`SHA1Hash.update`. :type data: byte string/byte array/memoryview :Return: A :class:`SHA1Hash` hash object )r r6)rs rr6r6s ::>>$  rc ft|tksJ|dksJtt}t|j|j||t|}|rtd|zt|S)z/Compute the expensive inner loop in PBKDF-HMAC.rz(Error %d with PBKDF2-HMAC assis for SHA1) r"r$rrSHA1_pbkdf2_hmac_assistrrr rr)innerouter first_digest iterationsr&rs r_pbkdf2_hmac_assistrFs |   + + + + >>>> { + +C  2 2L$$&&L$$&& Z(( **FNCfLMMM #  rr7)Crypto.Util.py3compatCrypto.Util._raw_apirrrrrr r robjectr r6r$r<rFr>rrrJs*$###////////////////// *)*= (`````v```F     "  r