pss signatures python

Solutions on MaxInterview for pss signatures python by the best coders in the world

showing results for - "pss signatures python"
Gabriela
19 Feb 2017
1>>> from Crypto.Signature import pss
2>>> from Crypto.Hash import SHA256
3>>> from Crypto.PublicKey import RSA
4>>> from Crypto import Random
5>>>
6>>> message = 'To be signed'
7>>> key = RSA.import_key(open('privkey.der').read())
8>>> h = SHA256.new(message)
9>>> signature = pss.new(key).sign(h)
10
similar questions
queries leading to this page
pss signatures python