Merge pull request #74 from clee704/master

Fix PasswordType
This commit is contained in:
Konsta Vesterinen
2014-04-01 10:47:02 +03:00
2 changed files with 4 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ class PasswordType(types.TypeDecorator, ScalarCoercible):
scheme = getattr(__import__('passlib.hash').hash, name)
length = 4 + len(scheme.name)
length += len(str(getattr(scheme, 'max_rounds', '')))
length += scheme.max_salt_size or 0
length += getattr(scheme, 'max_salt_size', 0)
length += getattr(
scheme,
'encoded_checksum_size',

View File

@@ -16,10 +16,11 @@ class TestPasswordType(TestCase):
schemes=[
'pbkdf2_sha512',
'pbkdf2_sha256',
'md5_crypt'
'md5_crypt',
'hex_md5'
],
deprecated=['md5_crypt']
deprecated=['md5_crypt', 'hex_md5']
))
def __repr__(self):