简体   繁体   English

在Google App Engine Python SDK上使用RSA私钥对字符串进行签名

[英]Signing a string with RSA private key on Google App Engine Python SDK

有没有已知的方法在Google App Engine Python SDK上使用RSA私钥签署纯文本字符串?

The library tlslite included in the gdata python library is a good option. 包含在gdata python库中的库tlslite是一个不错的选择。

http://code.google.com/p/gdata-python-client/ 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)

I haven't used it, but this appears to be a pure-Python RSA implementation, so it might work on App Engine: 我没有使用它,但这似乎是一个纯Python RSA实现,所以它可能适用于App Engine:

http://stuvel.eu/rsa http://stuvel.eu/rsa

Their Mercurial repo appears to be fairly active, too. 他们的Mercurial回购似乎也相当活跃。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM