ó ö 5Xc@sydZddlmZddlZddlmZmZmZdgZd„Z d„Z d Z de fd „ƒYZ dS(s¹ passlib.crypto._md4 -- fallback implementation of MD4 Helper implementing insecure and obsolete md4 algorithm. used for NTHASH format, which is also insecure and broken, since it's just md4(password). Implementated based on rfc at http://www.faqs.org/rfcs/rfc1320.html .. note:: This shouldn't be imported directly, it's merely used conditionally by ``passlib.crypto.lookup_hash()`` when a native implementation can't be found. iÿÿÿÿ(thexlifyN(t bascii_to_strtirangetPY3tmd4cCs||@||@BS(N((txtytz((s7/usr/lib/python2.7/site-packages/passlib/crypto/_md4.pytFscCs||@||@B||@BS(N((RRR((s7/usr/lib/python2.7/site-packages/passlib/crypto/_md4.pytG!sii icBsqeZdZdZdZZdZdZdZ dZ dd„Z ddddddgdddddd gdddddd gdddddd gddddd dgddddd d gdddddd gddddd d gddddddgdddddd gdddddd gddddd d gddddddgdddddd gdddddd gdddddd ggZ ddddddgddddd d gddddddgddddddgddddddgddddd d gddddddgddddddgddddddgdddddd gddddddgddddddgddddddgddddd d gddddd dgddddddggZ ddddddgddddddgddddd d gddddddgddddddgddddddgdddddd gddddddgddddddgddddddgddddd d gddddddgddddddgddddd dgddddd d gddddddggZd„Zd„Zd„Zd„Zd„ZRS(sÓpep-247 compatible implementation of MD4 hash algorithm .. attribute:: digest_size size of md4 digest in bytes (16 bytes) .. method:: update update digest by appending additional content .. method:: copy create clone of digest object, including current state .. method:: digest return bytes representing md4 digest of current content .. method:: hexdigest return hexadecimal version of digest Rii@icCsAd|_ddddg|_d|_|r=|j|ƒndS(Nii#EgI‰«ÍïIþܺ˜ivT2t(t_countt_statet_buftupdate(tselftcontent((s7/usr/lib/python2.7/site-packages/passlib/crypto/_md4.pyt__init__Ns   iiiii iiiiii i i i iic CsÂtjd|ƒ}|j}t|ƒ}xs|jD]h\}}}}} } ||t||||||ƒ|| t@} | | >t@| d| ?||t@| d| ?||t@| d| ?||s