Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #77581
| References | <614897cb-6a2f-4059-a713-05c0cd2b3cd5@googlegroups.com> <5bacfff0-246f-4c97-b8ba-5f6ce45acf29@googlegroups.com> |
|---|---|
| Date | 2014-09-05 17:47 +1000 |
| Subject | Re: Python Crypto Singature do not support Android??? |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.13786.1409903284.18130.python-list@python.org> (permalink) |
On Fri, Sep 5, 2014 at 5:23 PM, Frank Liou <fk26541598fk@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
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
Python Crypto Singature do not support Android??? Frank Liou <fk26541598fk@gmail.com> - 2014-09-05 00:02 -0700
Re: Python Crypto Singature do not support Android??? Chris Angelico <rosuav@gmail.com> - 2014-09-05 17:11 +1000
Re: Python Crypto Singature do not support Android??? Frank Liou <fk26541598fk@gmail.com> - 2014-09-05 00:23 -0700
Re: Python Crypto Singature do not support Android??? Chris Angelico <rosuav@gmail.com> - 2014-09-05 17:47 +1000
csiph-web