unsigned int encode_xor unsigned char data unsigned int size unsigned

1
2
3
4
5
unsigned int encode_xor(unsigned char *data, unsigned int size, unsigned int k) {
for (int *i = (int *) (data + size - 1); i >= (int *)data; --i)
k -= (*(unsigned int *) i = *(unsigned int *) i ^ k);
return k;
}