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

后端 未结 2 455
攒了一身酷
攒了一身酷 2021-01-02 19:15

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

2条回答
  •  梦谈多话
    2021-01-02 19:31

    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)
    

提交回复
热议问题