#NEWLINE# def hash( self , host , salt = None ) : #NEWLINE# #INDENT# if ( not salt ) : #NEWLINE# #INDENT# salt = self . generate_salt ( ) #NEWLINE# #UNINDENT# return ( hmac . new ( salt , host , digestmod = hashlib . sha1 ) . digest ( ) , salt )