ffdZddlmZddlmZmZmZmZmZm Z m Z eddZ Gdde Z d d Ze jZe jZdS) a MD4 is specified in RFC1320_ and produces the 128 bit digest of a message. >>> from Crypto.Hash import MD4 >>> >>> h = MD4.new() >>> h.update(b'Hello') >>> print h.hexdigest() MD4 stand for Message Digest version 4, and it was invented by Rivest in 1990. This algorithm is insecure. Do not use it for new designs. .. _RFC1320: http://tools.ietf.org/html/rfc1320 bord)load_pycryptodome_raw_lib VoidPointer SmartPointercreate_string_bufferget_raw_bufferc_size_t c_uint8_ptrzCrypto.Hash._MD4a int md4_init(void **shaState); int md4_destroy(void *shaState); int md4_update(void *hs, const uint8_t *buf, size_t len); int md4_digest(const void *shaState, uint8_t digest[20]); int md4_copy(const void *src, void *dst); cFeZdZdZdZdZdZd dZdZdZ d Z d Z d d Z dS) MD4Hashz&Class that implements an MD4 hash @z1.2.840.113549.2.4Nc6t}t|}|rt d|zt |tj|_|r| |dSdS)N Error %d while instantiating MD4) r _raw_md4_libmd4_init address_of ValueErrorrget md4_destroy_stateupdate)selfdatastateresults q/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib64/python3.11/site-packages/Crypto/Hash/MD4.py__init__zMD4Hash.__init__Os &&u'7'7'9'9::  '?%&'' '"599;;#/#;==   KK       c t|jt |t t |}|rtd|zdS)aContinue hashing of a message by consuming the next chunk of data. Repeated calls are equivalent to a single call with the concatenation of all the arguments. In other words: >>> m.update(a); m.update(b) is equivalent to: >>> m.update(a+b) :Parameters: data : byte string/byte array/memoryview The next chunk of the message being hashed. rN)r md4_updaterrr r lenr)rrrs rrzMD4Hash.updateZst"(():):)4T):):)1#d)))<)<>>  '?%&'' ' ' 'r ct|j}t|j|}|rt d|zt|S)arReturn the **binary** (non-printable) digest of the message that has been hashed so far. This method does not change the state of the hash object. You can continue updating the object after calling this function. :Return: A byte string of `digest_size` bytes. It may contain non-ASCII characters, including null bytes. r)r digest_sizer md4_digestrrrr )rbfrrs rdigestzMD4Hash.digestrso#4#344(():):),..  '?%&'' 'c"""r cddd|DS)aReturn the **printable** digest of the message that has been hashed so far. This method does not change the state of the hash object. :Return: A string of 2* `digest_size` characters. It contains only hexadecimal ASCII digits. c2g|]}dt|zS)z%02xr).0xs r z%MD4Hash.hexdigest..s#@@@Qa(@@@r )joinr()rs r hexdigestzMD4Hash.hexdigests-ww@@$++--@@@AAAr ct}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 MD4)r rmd4_copyrrr)rcloners rcopyz MD4Hash.copysc &&t{'8'8',|'7'7'9'9;;  D9FBCC C r c t|SN)r )rrs rnewz MD4Hash.newst}}r r6) __name__ __module__ __qualname____doc__r% block_sizeoidrrr(r0r4r7r rr r DsKJ C    '''0###( B B B$r r NcDt|S)aReturn a fresh instance of the hash object. :Parameters: data : byte string/byte array/memoryview The very first chunk of the message to hash. It is equivalent to an early call to `MD4Hash.update()`. Optional. :Return: A `MD4Hash` object )r r7)rs rr7r7s 99==  r r6)r;Crypto.Util.py3compatrCrypto.Util._raw_apirrrrr r r robjectr r7r%r<r>r rrCs>  '&&&&&////////////////// )(*    aaaaafaaaH    !   r