diff --git a/Doc/src/signature/pkcs1_pss.rst b/Doc/src/signature/pkcs1_pss.rst index 464096bc..e67484b3 100644 --- a/Doc/src/signature/pkcs1_pss.rst +++ b/Doc/src/signature/pkcs1_pss.rst @@ -12,10 +12,9 @@ The following example shows how the sender can use its own *private* key >>> 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()) + >>> message = b'To be signed' + >>> key = RSA.import_key(open('privkey.der', 'rb').read()) >>> h = SHA256.new(message) >>> signature = pss.new(key).sign(h)