[pycrypto] windows + linux line endings issue
Dave Pawson
dave.pawson at gmail.com
Wed Jan 22 03:15:17 PST 2014
On 22 January 2014 11:01, Nicco Kunzmann <niccokunzmann at rambler.ru> wrote:
> Hello,
>
> I do not know your code but could you check that you save (open(.., 'wb'))
> and load the file (open(..., 'rb')) in the binary mode instead of text mode
> without 'b'?
>
> Greetings!
Hi Nicco.
with open(in_filename, 'rb') as infile:
with open(out_filename, 'wb') as outfile:
is used to read plain text, write encrypted
and
with open(in_filename, 'rb') as infile:
for decrypt.
Google searching suggested that - but I was already using it.
Not sure what else affects it?
regards
>
> Am 22.01.2014 11:30, schrieb Dave Pawson:
>
> I want to share an encrypted file across Windows / Linux (say by
> saving the file to Dropbox).
>
> When I encrypt using Linux and decrypt using Windows, the
> line ending differences screw up the decryption.
>
> I think it's a Python issue, but I'm unsure. Has anyone addressed
> this please?
>
> TiA
>
>
>
> _______________________________________________
> pycrypto mailing list
> pycrypto at lists.dlitz.net
> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
>
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
More information about the pycrypto
mailing list