📜  pss签名python代码示例

📅  最后修改于: 2022-03-11 14:45:10.036000             🧑  作者: Mango

代码示例1
>>> from Crypto.Signature import pss
>>> from Crypto.Hash import SHA256
>>> from Crypto.PublicKey import RSA
>>> from Crypto import Random
>>>
>>> message = 'To be signed'
>>> key = RSA.import_key(open('privkey.der').read())
>>> h = SHA256.new(message)
>>> signature = pss.new(key).sign(h)