All pastes #795023 Raw Edit

Untitled

public python v1 · immutable
#795023 ·published 2007-11-23 16:51 UTC
rendered paste body
def CheckSum(linha):    valor = linha[1:-2]    total = 0    i = 0    while i < len(valor):        total = total + int(valor[i] + valor[i+1], 16)        i+=2    return hex(256 - int(hex(total)[2:][-2:], 16))