Simple XOR encryption routine in C/C++
问题 I'm trying to encrypt/decrypt a file using XOR. I have the following encryption/decryption routine where every byte is xor'd and the result is being subtracted by the value of the byte that is located at the previous location. The ASM representation is as follows crypt: mov dl, [eax+ecx] ; read byte xor dl, 0C5h ; xor it with oxC5 sub dl, [eax+ecx-1] ; sub the previous byte mov [eax+ecx], dl ; save the new byte dec eax ; decrement pointer test eax, eax jg short crypt ; That is what my