#NEWLINE# def generate( self , counter ) : #NEWLINE# #INDENT# truncated_value = self . _dynamic_truncate ( counter ) #NEWLINE# hotp = ( hotp % ( 10 ** self . _length ) ) #NEWLINE# return '{0:0{1}}' . format ( hotp , self . _length ) . encode ( )