Using PyCrypto

62 views
Skip to first unread message

Devel63

unread,
May 5, 2009, 6:25:54 PM5/5/09
to Google App Engine
Has anyone used PyCrypto successfully with App Engine (http://
code.google.com/appengine/docs/python/tools/libraries.html#PyCrypto)?
I've run into 2 obstacles -

1) Since there's no distribution with App Engine SDK, does anyone know
a safe source of the library for use on a Windows development machine?

2) Trying to use it on http://shell.appspot.com, I get errors

from Crypto.Cipher import DES
obj=DES.new('abcdefgh', DES.MODE_ECB)

-->all sorts of traceback errors mentioning pickling

Nick Johnson (Google)

unread,
May 6, 2009, 6:29:08 AM5/6/09
to google-a...@googlegroups.com
On Tue, May 5, 2009 at 11:25 PM, Devel63 <DanSt...@gmail.com> wrote:
>
> Has anyone used PyCrypto successfully with App Engine (http://
> code.google.com/appengine/docs/python/tools/libraries.html#PyCrypto)?
> I've run into 2 obstacles -
>
> 1) Since there's no distribution with App Engine SDK, does anyone know
> a safe source of the library for use on a Windows development machine?

Install easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall

Then issue the command "easy_install pycrypto"

>
> 2) Trying to use it on http://shell.appspot.com, I get errors
>
> from Crypto.Cipher import DES
> obj=DES.new('abcdefgh', DES.MODE_ECB)
>
> -->all sorts of traceback errors mentioning pickling

As I said in your other thread, shell.appspot.com uses pickle to
persist data between requests. This is not an issue with usage inside
your app.

-Nick Johnson

Devel63

unread,
May 6, 2009, 11:16:02 AM5/6/09
to Google App Engine
Thanks, Nick!

On May 6, 3:29 am, "Nick Johnson (Google)" <nick.john...@google.com>
wrote:
> On Tue, May 5, 2009 at 11:25 PM, Devel63 <DanStic...@gmail.com> wrote:
>
> > Has anyone used PyCrypto successfully with App Engine (http://
> > code.google.com/appengine/docs/python/tools/libraries.html#PyCrypto)?
> > I've run into 2 obstacles -
>
> > 1) Since there's no distribution with App Engine SDK, does anyone know
> > a safe source of the library for use on a Windows development machine?
>
> Install easy_install:http://peak.telecommunity.com/DevCenter/EasyInstall
>
> Then issue the command "easy_install pycrypto"
>
>
>
> > 2) Trying to use it onhttp://shell.appspot.com, I get errors

Mike Wiacek

unread,
May 5, 2009, 8:13:11 PM5/5/09
to google-a...@googlegroups.com
from Crypto.Cipher import DES
obj=DES.new('abcdefgh', DES.MODE_ECB)

Try executing those two lines in the same request on
shell.appspot.com. Rather than press <enter> after the import, try
<shift>-<enter> and then try the call to DES.new().

..mike
Reply all
Reply to author
Forward
0 new messages