Is there any known way to sign a plain text string with RSA private key on Google App Engine Python SDK?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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)
回答2:
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.