#NEWLINE# def __init__( self , hashFunction , key = None ) : #NEWLINE# #INDENT# ' initialize HMAC with hashfunction and optionally the key ' #NEWLINE# self . H = hashFunction ( ) #NEWLINE# self . H_outer = hashFunction ( ) #NEWLINE# self . B = self . H . raw_block_size #NEWLINE# self . name = ( 'HMAC_' + self . H . name ) #NEWLINE# self . blocksize = 1 #NEWLINE# self . raw_block_size = self . H . raw_block_size #NEWLINE# self . digest_size = self . H . digest_size #NEWLINE# if ( self != None ) : #NEWLINE# #INDENT# self . setKey ( key ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . keyed = None