diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2017-02-17 11:21:50 -0500 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2017-02-17 11:21:50 -0500 |
| commit | 5b529f14d35c657c6d67a8fc5ee5dfaf89d5c6e3 (patch) | |
| tree | cbba1a0ce1111317c8647a0396804db24b4f45f6 /passlib/crypto | |
| parent | d9ebfa4a70506d47dae94c1ab1a3c40f854428d7 (diff) | |
| download | passlib-5b529f14d35c657c6d67a8fc5ee5dfaf89d5c6e3.tar.gz | |
compat cleanup: replaced all u("") instances with u""
realized can do this now that we're requiring python3 >= 3.3.
had to keep u() helper around for u(r"") instances, since py3 doesn't have ur"".
but switched it to use ascii decoding for py2, to make sure things are clean.
Diffstat (limited to 'passlib/crypto')
| -rw-r--r-- | passlib/crypto/_blowfish/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/passlib/crypto/_blowfish/__init__.py b/passlib/crypto/_blowfish/__init__.py index 1aa1c85..9a9d378 100644 --- a/passlib/crypto/_blowfish/__init__.py +++ b/passlib/crypto/_blowfish/__init__.py @@ -56,7 +56,7 @@ 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.utils.compat import BytesIO, unicode, native_string_types from passlib.crypto._blowfish.unrolled import BlowfishEngine # local __all__ = [ @@ -101,11 +101,11 @@ def raw_bcrypt(password, ident, salt, log_rounds): # parse ident assert isinstance(ident, native_string_types) 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: |
