[pycrypto] string XOR

Dean Macinskas dmacinskas at geobridge.net
Fri Oct 21 07:55:50 CST 2011


This isn't a pycrypto question per se, but I thought someone might know the answer: I need to exclusive-OR two strings together.  I tried operator.XOR, but I get a runtime error:

    ke = operator.xor(kbpkb,ve)
TypeError: unsupported operand type(s) for ^: 'str' and 'str'

Is there a way to do this in native Python (I'm using 2.7.2), or must I use a library of some sort?

Thanks,
dpm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.dlitz.net/pipermail/pycrypto/attachments/20111021/99fa5bbc/attachment.htm 


More information about the pycrypto mailing list