@@ -97,27 +97,27 @@ class RhodeCodeCrypto(object):
raise Exception('Unknown or unsupported platform %s' % __platform__)
@classmethod
def hash_check(cls, password, hashed):
"""
Checks matching password with it's hashed value, runs different
implementation based on platform it runs on
:param password: password
:param hashed: password in hashed form
if __platform__ == 'Windows':
if __platform__ in PLATFORM_WIN:
return sha256(password).hexdigest() == hashed
elif __platform__ in ('Linux', 'Darwin'):
elif __platform__ in PLATFORM_OTHERS:
return bcrypt.hashpw(password, hashed) == hashed
else:
def get_crypt_password(password):
return RhodeCodeCrypto.hash_string(password)
def check_password(password, hashed):
return RhodeCodeCrypto.hash_check(password, hashed)
def authfunc(environ, username, password):
Status change: