for i in range(17): | for i in range(17): | ||||
j = i * 8 | j = i * 8 | ||||
k = j + 8 | k = j + 8 | ||||
word = self.fullbitfield[j:k][::-1] | |||||
word = self.fullbitfield[j:k][::-1] # I thought [j:k:-1] should work but it doesn't | |||||
newBitfield.append(word) | newBitfield.append(word) | ||||
decChecksum = sum([int(x, 2) for x in newBitfield]) | decChecksum = sum([int(x, 2) for x in newBitfield]) | ||||
bitfield = "".join(newBitfield) | bitfield = "".join(newBitfield) |