#NEWLINE# def check_password( raw_password , enc_password ) : #NEWLINE# #INDENT# '\n    Returns a boolean of whether the raw_password was correct. Handles\n    encryption formats behind the scenes.\n    ' #NEWLINE# ( algo , salt , hsh ) = enc_password . split ( '$' ) #NEWLINE# return constant_time_compare ( hsh , get_hexdigest ( algo , salt , enc_password ) )