#NEWLINE# def _clean_key( self , key ) : #NEWLINE# #INDENT# md5 = hashlib . md5 ( key . encode ( 'utf8' ) ) . hexdigest ( ) #NEWLINE# key = self . _prefix . sub ( '' , key ) #NEWLINE# key = self . _illegal . sub ( ',' , key ) #NEWLINE# return ',' . join ( ( key [ : self . _maxlen ] , md5 ) )