Python RSA解密引发错误

时间:2017-07-11 11:08:01

标签: python encryption python-3.5 private-key pycrypto

from Crypto.PublicKey import RSA
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA
from base64 import b64decode
def wesocket_Data_Receive(request):
    Data=request.GET.get('ContentData')
    key =open('D:\\WithOldDjango\\AssetManagment\\AssetManagment
    \\blog\\templates\\private.key', 'rb')
    rsakey = RSA.importKey(key.read())
    return HttpResponse(Data)

使用python 3.5错误读取私钥时出现以下错误:“不支持RSA密钥格式” 以上是我的代码

0 个答案:

没有答案