diff options
Diffstat (limited to 'passlib/crypto/_blowfish/__init__.py')
-rw-r--r-- | passlib/crypto/_blowfish/__init__.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/passlib/crypto/_blowfish/__init__.py b/passlib/crypto/_blowfish/__init__.py index 1aa1c85..3ee4590 100644 --- a/passlib/crypto/_blowfish/__init__.py +++ b/passlib/crypto/_blowfish/__init__.py @@ -56,7 +56,6 @@ import struct # pkg from passlib.utils import getrandbytes, rng from passlib.utils.binary import bcrypt64 -from passlib.utils.compat import BytesIO, unicode, u, native_string_types from passlib.crypto._blowfish.unrolled import BlowfishEngine # local __all__ = [ @@ -99,13 +98,13 @@ def raw_bcrypt(password, ident, salt, log_rounds): #=================================================================== # parse ident - assert isinstance(ident, native_string_types) + assert isinstance(ident, str) add_null_padding = True - if ident == u('2a') or ident == u('2y') or ident == u('2b'): + if ident == u'2a' or ident == u'2y' or ident == u'2b': pass - elif ident == u('2'): + elif ident == u'2': add_null_padding = False - elif ident == u('2x'): + elif ident == u'2x': raise ValueError("crypt_blowfish's buggy '2x' hashes are not " "currently supported") else: |