Python Crypto Singature do not support Android???

Chris Angelico rosuav at gmail.com
Fri Sep 5 03:47:55 EDT 2014


On Fri, Sep 5, 2014 at 5:23 PM, Frank Liou <fk26541598fk at gmail.com> wrote:
> here is my code
>
> python :
>
> msg = '123'
> msg = msg.encode('utf-8')
> digest = SHA.new(msg).digest()
> signature = APP_key_Private.sign(digest, '')

That code is incomplete, I can't run it. Ditto your Java code. But
what seems to be happening is that you're getting data back in two
very different formats, plus you're generating one signature based on
a UTF-8 stream and one based on a Base-64 stream. Start by writing
*simple* code that does what you want, and then porting that to the
other language exactly.

Also, please don't use Google Groups, or if you must, please remember
to include context.

ChrisA



More information about the Python-list mailing list