#NEWLINE# def makeMAC( self , seqid , data ) : #NEWLINE# #INDENT# '\n        Create a message authentication code (MAC) for the given packet using\n        the outgoing MAC values.\n\n        @type seqid: L{int}\n        @param seqid: The sequence ID of the outgoing packet.\n\n        @type data: L{bytes}\n        @param data: The data to create a MAC for.\n\n        @rtype: C{str}\n        @return: The serialized MAC.\n        ' #NEWLINE# if ( not self . outMAC [ 0 ] ) : #NEWLINE# #INDENT# return b'' #NEWLINE# #UNINDENT# data = ( struct . pack ( '>L' , seqid ) + data ) #NEWLINE# return hmac . HMAC ( self . outMAC . key , data , self . outMAC [ 0 ] ) . digest ( )