#NEWLINE# def match( self , key , creds ) : #NEWLINE# #INDENT# "Checks whether the user-provided key matches the user's credentials\n\n        :param key: User-supplied key\n        :param creds: User's stored credentials\n        :returns: True if the supplied key is valid, False otherwise\n        " #NEWLINE# ( type , rest ) = creds . split ( ':' ) #NEWLINE# ( salt , enc ) = rest . split ( '$' ) #NEWLINE# return ( self . encode_w_salt ( salt , key ) == creds )