Merge pull request #79 from onovy/master

Cleanup.
This commit is contained in:
Greg Holt 2015-04-28 09:45:48 -05:00
commit fb805858e7

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