Python RSA解密正在抛出

2024-03-28 12:13:02 发布

您现在位置:Python中文网/ 问答频道 /正文

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)

我在使用Python3.5读取私钥时遇到以下错误错误:“不支持RSA密钥格式” 以上是我的代码


Tags: keyfromimportdatarequest错误hashcrypto