#NEWLINE# def process_word( data , crc = 4294967295 ) : #NEWLINE# #INDENT# if ( len ( data ) < 4 ) : #NEWLINE# #INDENT# d_array = array . array ( 'B' , data ) #NEWLINE# for x in range ( 0 , ( 4 - len ( data ) ) ) : #NEWLINE# #INDENT# d_array . insert ( 0 , 0 ) #NEWLINE# #UNINDENT# d_array . reverse ( ) #NEWLINE# data = d_array . tostring ( ) #NEWLINE# #UNINDENT# d = array . array ( 'I' , data ) [ 0 ] #NEWLINE# crc = ( crc ^ d ) #NEWLINE# for i in range ( 0 , 32 ) : #NEWLINE# #INDENT# if ( ( crc & 2147483648 ) != 0 ) : #NEWLINE# #INDENT# crc = ( ( crc << 1 ) ^ CRC_POLY ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# crc = ( crc << 1 ) #NEWLINE# #UNINDENT# #UNINDENT# result = ( crc & 4294967295 ) #NEWLINE# return result