[Tutor] Pack as HEX question

bob gailer bgailer at gmail.com
Sun Oct 25 02:57:57 CET 2009


Dave Angel wrote:
>
>
> for byte0, byte1 in itertools.izip(packed_data, 
> itertools.cycle(packed_XorKey)):
>    decrypt.append(chr(ord(byte0) ^ ord(byte1)))
>

And of course that leads to:

decrypt = [chr(ord(byte0) ^ ord(byte1)) for byte0, byte1 in 
itertools.izip(packed_data, itertools.cycle(packed_XorKey))]

-- 
Bob Gailer
Chapel Hill NC
919-636-4239


More information about the Tutor mailing list