[Tutor] Cryptography Toolkit

Mark Thomas thomas.s.mark at gmail.com
Thu Mar 31 16:35:47 CEST 2005


On Thu, 31 Mar 2005 09:14:03 -0500, Kent Johnson <kent37 at tds.net> wrote:
> If you post your code and the complete error message including the stack trace we may be able to help.
> 
> Kent

Thanks Ken

I'm getting closer to making this work using the XOR cipher. Here's
what I'm doing.

<from python>

from Crypto.Cipher import XOR

obj_xor = XOR.new("string")
str_encrypt = "encrypt this string"
xored = obj_xor.encrypt(str_encrypt)
xored
'\x16\x1a\x11\x1b\x17\x17\x07T\x06\x01\x07\x14S\x07\x06\x1b\x07\t\x14'
obj_xor.decrypt(xored)
"bhxupds&oo`g'uou`z`" <== *confused by this output*

</from python>

Close but no cigar!! *grin*

-- 
 _
( ) Mark Thomas     ASCII ribbon campaign
 X www.theswamp.org   - against HTML email
/ \


More information about the Tutor mailing list