XOR encryption

joe jacob joejacob21 at gmail.com
Fri Jan 18 06:16:25 EST 2008


On Jan 18, 4:11 pm, Marc 'BlackJack' Rintsch <bj_... at gmx.net> wrote:
> 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

Thanks a lot for the information now it is working fine.



More information about the Python-list mailing list