diff options
Diffstat (limited to 'pipermail/pycrypto/2011q2/000445.html')
-rw-r--r-- | pipermail/pycrypto/2011q2/000445.html | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/pipermail/pycrypto/2011q2/000445.html b/pipermail/pycrypto/2011q2/000445.html new file mode 100644 index 0000000..bdac682 --- /dev/null +++ b/pipermail/pycrypto/2011q2/000445.html @@ -0,0 +1,81 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [pycrypto] PyCrypto 2.3 and unicode + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20PyCrypto%202.3%20and%20unicode&In-Reply-To="> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="000442.html"> + <LINK REL="Next" HREF="000446.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[pycrypto] PyCrypto 2.3 and unicode</H1> + <B>Thomas Knox</B> + <A HREF="mailto:pycrypto%40lists.dlitz.net?Subject=%5Bpycrypto%5D%20PyCrypto%202.3%20and%20unicode&In-Reply-To=" + TITLE="[pycrypto] PyCrypto 2.3 and unicode">knoxth at gmail.com + </A><BR> + <I>Mon May 16 13:18:26 CST 2011</I> + <P><UL> + <LI>Previous message: <A HREF="000442.html">[pycrypto] Initial review of Thorsten's Py3k changes +</A></li> + <LI>Next message: <A HREF="000446.html">[pycrypto] PyCrypto 2.3 and unicode +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#445">[ date ]</a> + <a href="thread.html#445">[ thread ]</a> + <a href="subject.html#445">[ subject ]</a> + <a href="author.html#445">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Hello, + +I'm building an application in Python 2.7.1 using PyCrypto 2.3, and it's +behaving badly with utf-8 and utf-16 strings. For example: + +from Crypto.Cipher import AES +foo = AES.new('a1b2c3d4e5f6g7h8', AES.MODE_ECB) +bar=u'' +for i in range(0,16): + bar+=unichr(255) +# At this point, bar is +# u'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' +baz=foo.encrypt(bar.encode('utf-8')) +blah=foo.decrypt(baz) +# baz is now +# +'\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' + +How can I get encrypt and decrypt to use UTF gracefully? + +Thank you, +Tom +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: <A HREF="http://lists.dlitz.net/pipermail/pycrypto/attachments/20110516/07a6ddd9/attachment.htm">http://lists.dlitz.net/pipermail/pycrypto/attachments/20110516/07a6ddd9/attachment.htm</A> +</PRE> + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000442.html">[pycrypto] Initial review of Thorsten's Py3k changes +</A></li> + <LI>Next message: <A HREF="000446.html">[pycrypto] PyCrypto 2.3 and unicode +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#445">[ date ]</a> + <a href="thread.html#445">[ thread ]</a> + <a href="subject.html#445">[ subject ]</a> + <a href="author.html#445">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto">More information about the pycrypto +mailing list</a><br> +</body></html> |