summaryrefslogtreecommitdiff
path: root/pipermail/pycrypto/attachments/20110516/07a6ddd9/attachment.html
diff options
context:
space:
mode:
Diffstat (limited to 'pipermail/pycrypto/attachments/20110516/07a6ddd9/attachment.html')
-rw-r--r--pipermail/pycrypto/attachments/20110516/07a6ddd9/attachment.html7
1 files changed, 7 insertions, 0 deletions
diff --git a/pipermail/pycrypto/attachments/20110516/07a6ddd9/attachment.html b/pipermail/pycrypto/attachments/20110516/07a6ddd9/attachment.html
new file mode 100644
index 0000000..1afd081
--- /dev/null
+++ b/pipermail/pycrypto/attachments/20110516/07a6ddd9/attachment.html
@@ -0,0 +1,7 @@
+<tt>
+Hello,&lt;br&gt;&lt;br&gt;I&amp;#39;m&nbsp;building&nbsp;an&nbsp;application&nbsp;in&nbsp;Python&nbsp;2.7.1&nbsp;using&nbsp;PyCrypto&nbsp;2.3,&nbsp;and&nbsp;it&amp;#39;s&nbsp;behaving&nbsp;badly&nbsp;with&nbsp;utf-8&nbsp;and&nbsp;utf-16&nbsp;strings.&nbsp;For&nbsp;example:&lt;br&gt;&lt;br&gt;from&nbsp;Crypto.Cipher&nbsp;import&nbsp;AES&lt;br&gt;foo&nbsp;=&nbsp;AES.new(&amp;#39;a1b2c3d4e5f6g7h8&amp;#39;,&nbsp;AES.MODE_ECB)&lt;br&gt;<br>
+bar=u&amp;#39;&amp;#39;&lt;br&gt;for&nbsp;i&nbsp;in&nbsp;range(0,16):&lt;br&gt; &nbsp; &nbsp;bar+=unichr(255)&lt;br&gt;#&nbsp;At&nbsp;this&nbsp;point,&nbsp;bar&nbsp;is&lt;br&gt;#&nbsp;u&amp;#39;\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff&amp;#39;&lt;br&gt;baz=foo.encrypt(bar.encode(&amp;#39;utf-8&amp;#39;))&lt;br&gt;<br>
+blah=foo.decrypt(baz)&lt;br&gt;#&nbsp;baz&nbsp;is&nbsp;now&lt;br&gt;#&nbsp;&amp;#39;\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf\xc3\xbf&amp;#39;&lt;br&gt;&lt;br&gt;How&nbsp;can&nbsp;I&nbsp;get&nbsp;encrypt&nbsp;and&nbsp;decrypt&nbsp;to&nbsp;use&nbsp;UTF&nbsp;gracefully?&lt;br&gt;<br>
+&lt;br&gt;Thank&nbsp;you,&lt;br&gt;Tom&lt;br&gt;<br>
+
+</tt>