问题描述
我对这个错误的含义甚至有疑问:“ AttributeError:'bytes'对象没有属性'oid'”。我不是使用私钥,而是使用公钥对消息签名以创建签名来测试API登录。我不能使用私钥,因为没有给我一个。有谁知道这意味着什么,我该如何解决这个错误?
server_salt = serversalt(user_id)
client_salt = "random sequence of numbers"
message = base64.b64encode(user_id.encode("utf-8"))+ server_salt
key = Ecc.generate(curve="primve256v1")
key = key.public_key().export_key(format="DER")
public_key = ECC.import(key)
signer = DSS.new(public_kay,"fips-186-3")
signature = signer.sign(message)
print(signature)
响应:AttributeError:'bytes'对象没有属性'oid'
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)