#NEWLINE# def finalize( self ) : #NEWLINE# #INDENT# self . update ( b'' ) #NEWLINE# tag_size = ( self . _cipher . block_size // 8 ) #NEWLINE# tag_buf = self . _backend . _ffi . new ( 'unsigned char[]' , tag_size ) #NEWLINE# tag_len = self . _backend . _ffi . new ( 'size_t *' , tag_size ) #NEWLINE# res = self . _backend . _lib . CCCryptorGCMFinal ( self . _ctx [ 0 ] , tag_size , tag_len ) #NEWLINE# self . _backend . _check_cipher_response ( res ) #NEWLINE# self . _backend . _release_cipher_ctx ( self . _ctx ) #NEWLINE# self . _tag = self . _backend . _ffi . buffer ( tag_buf ) [ : ] #NEWLINE# if ( ( self . _operation == self . _backend . _lib . kCCDecrypt ) and ( not constant_time . bytes_eq ( self . _tag [ : len ( self . _mode . tag ) ] , self . _mode . tag ) ) ) : #NEWLINE# #INDENT# raise InvalidTag #NEWLINE# #UNINDENT# return b''