Name: Anonymous 2011-11-30 4:01
Hey prog, I wrote a simple xor cipher that takes the exclusive or of the plain text with the key, but it also takes some state from the previous calculation.
The first value of prev_state is always zero. That is,
The cipher text and cipher implementation is below, cut among many posts to avoid long post detection.
cipher[i] = plain[i] ^ key[i] ^ prev_state[i - 1]
prev_state[i] = (cipher[i] + plain[i]) mod 256The first value of prev_state is always zero. That is,
prev_state[-1] = 0.The cipher text and cipher implementation is below, cut among many posts to avoid long post detection.