def computeLRC(data):
 lrc = (sum((ord(a) for a in data)) & 255)
 lrc = ((lrc ^ 255) + 1)
 return (lrc & 255)

def computeLRC ( data ) : lrc = ( sum ( ( ord ( a ) for a in data ) ) & 255 ) lrc = ( ( lrc ^ 255 ) + 1 ) return ( lrc & 255 )
used to compute the longitudinal redundancy check against a string .