diff options
Diffstat (limited to 'pipermail/pycrypto/attachments/20111021/19554354/attachment.htm')
-rw-r--r-- | pipermail/pycrypto/attachments/20111021/19554354/attachment.htm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/pipermail/pycrypto/attachments/20111021/19554354/attachment.htm b/pipermail/pycrypto/attachments/20111021/19554354/attachment.htm new file mode 100644 index 0000000..ee16ada --- /dev/null +++ b/pipermail/pycrypto/attachments/20111021/19554354/attachment.htm @@ -0,0 +1,55 @@ +<tt> +<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--<br> +/* Font Definitions */<br> +@font-face<br> +        {font-family:SimSun;<br> +        panose-1:2 1 6 0 3 1 1 1 1 1;}<br> +@font-face<br> +        {font-family:SimSun;<br> +        panose-1:2 1 6 0 3 1 1 1 1 1;}<br> +@font-face<br> +        {font-family:Calibri;<br> +        panose-1:2 15 5 2 2 2 4 3 2 4;}<br> +@font-face<br> +        {font-family:Tahoma;<br> +        panose-1:2 11 6 4 3 5 4 4 2 4;}<br> +@font-face<br> +        {font-family:"\@SimSun";<br> +        panose-1:2 1 6 0 3 1 1 1 1 1;}<br> +/* Style Definitions */<br> +p.MsoNormal, li.MsoNormal, div.MsoNormal<br> +        {margin:0in;<br> +        margin-bottom:.0001pt;<br> +        font-size:11.0pt;<br> +        font-family:"Calibri","sans-serif";}<br> +a:link, span.MsoHyperlink<br> +        {mso-style-priority:99;<br> +        color:blue;<br> +        text-decoration:underline;}<br> +a:visited, span.MsoHyperlinkFollowed<br> +        {mso-style-priority:99;<br> +        color:purple;<br> +        text-decoration:underline;}<br> +span.EmailStyle17<br> +        {mso-style-type:personal;<br> +        font-family:"Calibri","sans-serif";<br> +        color:windowtext;}<br> +span.EmailStyle18<br> +        {mso-style-type:personal-reply;<br> +        font-family:"Calibri","sans-serif";<br> +        color:#1F497D;}<br> +.MsoChpDefault<br> +        {mso-style-type:export-only;<br> +        font-size:10.0pt;}<br> +@page WordSection1<br> +        {size:8.5in 11.0in;<br> +        margin:1.0in 1.0in 1.0in 1.0in;}<br> +div.WordSection1<br> +        {page:WordSection1;}<br> +--></style><!--[if gte mso 9]><xml><br> +<o:shapedefaults v:ext="edit" spidmax="1026" /><br> +</xml><![endif]--><!--[if gte mso 9]><xml><br> +<o:shapelayout v:ext="edit"><br> +<o:idmap v:ext="edit" data="1" /><br> +</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>&quot;&quot;.join([chr (ord(a)^ord(b)) for a,b in zip(&quot;abc&quot;,&quot;def&quot;)])<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; paul<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> pycrypto-bounces@lists.dlitz.net [mailto:pycrypto-bounces@lists.dlitz.net] <b>On Behalf Of </b>Dean Macinskas<br><b>Sent:</b> Friday, October 21, 2011 9:56 AM<br><b>To:</b> pycrypto@lists.dlitz.net<br><b>Subject:</b> [pycrypto] string XOR<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>This isn't a pycrypto question per se, but I thought someone might know the answer: I need to exclusive-OR two strings together.&nbsp; I tried operator.XOR, but I get a runtime error: <o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>&nbsp;&nbsp;&nbsp; ke = operator.xor(kbpkb,ve)<o:p></o:p></p><p class=MsoNormal>TypeError: unsupported operand type(s) for ^: 'str' and 'str'<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>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?<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal>Thanks,<o:p></o:p></p><p class=MsoNormal>dpm<o:p></o:p></p><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html> +</tt> |