Make pylint and pycodestyle happy with the code

This commit is contained in:
2021-03-24 12:26:59 +01:00
parent 86484a091f
commit 0e72e78bbf
3 changed files with 144 additions and 7 deletions

View File

@@ -16,23 +16,24 @@ SALT_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
class werkzeug_pbkdf2_sha256(uh.HasSalt, uh.HasRounds, uh.GenericHandler):
checksum_chars = AB64_CHARS
# pylint: disable=invalid-name
"""Passlib handler for Werkzeugs PBKDF2:SHA-256 passwords
"""
checksum_chars = '0123456789abcdef'
checksum_size = 64
default_rounds = 150000
default_salt_chars = SALT_CHARS
default_salt_size = 8
_digest = 'sha256'
ident = u('pbkdf2:sha256')
max_rounds = 0xffffffff
max_salt_size = None
min_salt_size = 1
name = 'werkzeug_pbkdf2_sha256'
salt_chars = SALT_CHARS
setting_kwds = ('salt', 'salt_size')
werkzeug_name = 'pbkdf2:sha256'
# pylint: disable=arguments-differ
@classmethod
def from_string(cls, password_hash):
def from_string(cls, password_hash, **context):
"""Create a new hash object from a string
"""