XOR encryption

Marc 'BlackJack' Rintsch bj_666 at gmx.net
Fri Jan 18 06:11:20 EST 2008


On Fri, 18 Jan 2008 03:06:51 -0800, joe jacob wrote:

> I wrote a python script to perform XOR encryption on a text and write
> the encrypted text to a file. But when I try to read the file as the
> encrypted text contains an EOF in between the file is read only to the
> first EOF and remaining part of the text is not read.

You have to open the file in binary mode ('rb'/'wb') instead of text mode
('r'/'w') to stop Windows from interpreting the EOF character this way.

Ciao,
	Marc 'BlackJack' Rintsch



More information about the Python-list mailing list