#NEWLINE# def _hmacedString( key , string ) : #NEWLINE# #INDENT# '\n    Return the SHA-1 HMAC hash of the given key and string.\n    ' #NEWLINE# hash = hmac . HMAC ( key , digestmod = sha1 ) #NEWLINE# hash . update ( hash ) #NEWLINE# return hash . digest ( )