This commit is contained in:
onovy 2015-04-28 09:40:02 +02:00
parent 5043df5d31
commit b31b308728
1 changed files with 4 additions and 4 deletions

View File

@ -111,8 +111,8 @@ class Sha1(object):
:returns: True if the supplied key is valid, False otherwise
"""
[type, rest] = creds.split(':')
[salt, enc] = rest.split('$')
type, rest = creds.split(':')
salt, enc = rest.split('$')
return self.encode_w_salt(salt, key) == creds
@ -159,7 +159,7 @@ class Sha512(object):
:returns: True if the supplied key is valid, False otherwise
"""
[type, rest] = creds.split(':')
[salt, enc] = rest.split('$')
type, rest = creds.split(':')
salt, enc = rest.split('$')
return self.encode_w_salt(salt, key) == creds