diff options
Diffstat (limited to 'passlib/crypto/_md4.py')
-rw-r--r-- | passlib/crypto/_md4.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/passlib/crypto/_md4.py b/passlib/crypto/_md4.py index bdc211f..e6ab63e 100644 --- a/passlib/crypto/_md4.py +++ b/passlib/crypto/_md4.py @@ -20,7 +20,7 @@ Implementated based on rfc at http://www.faqs.org/rfcs/rfc1320.html from binascii import hexlify import struct # site -from passlib.utils.compat import bascii_to_str, irange, PY3 +from passlib.utils.compat import bascii_to_str # local __all__ = ["md4"] @@ -176,16 +176,12 @@ class md4(object): state[a] = ((t<<s) & MASK_32) + (t>>(32-s)) # add back into original state - for i in irange(4): + for i in range(4): orig[i] = (orig[i]+state[i]) & MASK_32 def update(self, content): if not isinstance(content, bytes): - if PY3: - raise TypeError("expected bytes") - else: - # replicate behavior of hashlib under py2 - content = content.encode("ascii") + raise TypeError("expected bytes") buf = self._buf if buf: content = buf + content |