Signing a string with RSA private key on Google Ap

2019-02-09 17:52发布

Is there any known way to sign a plain text string with RSA private key on Google App Engine Python SDK?

2条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-02-09 18:10

I haven't used it, but this appears to be a pure-Python RSA implementation, so it might work on App Engine:

http://stuvel.eu/rsa

Their Mercurial repo appears to be fairly active, too.

查看更多
趁早两清
3楼-- · 2019-02-09 18:12

The library tlslite included in the gdata python library is a good option.

http://code.google.com/p/gdata-python-client/

example:

from tlslite.utils import keyfactory
private_key = keyfactory.parsePrivateKey(rsa_key)
signed = private_key.hashAndSign(data)
查看更多
登录 后发表回答