Python: Add test of public_key method with cryptodome

Added in 3.10 release https://github.com/Legrandin/pycryptodome/blob/master/Changelog.rst#3100-6-february-2021
This commit is contained in:
Rasmus Wriedt Larsen
2021-02-16 15:47:39 +01:00
parent 8d3170bcb4
commit bfbaa85272
2 changed files with 6 additions and 0 deletions

View File

@@ -6,7 +6,10 @@ from Crypto.Signature import pss
from Crypto.Hash import SHA256
private_key = RSA.generate(2048) # $ PublicKeyGeneration keySize=2048
# These 2 methods do the same
public_key = private_key.publickey()
public_key = private_key.public_key()
# ------------------------------------------------------------------------------
# encrypt/decrypt

View File

@@ -6,7 +6,10 @@ from Cryptodome.Signature import pss
from Cryptodome.Hash import SHA256
private_key = RSA.generate(2048) # $ PublicKeyGeneration keySize=2048
# These 2 methods do the same
public_key = private_key.publickey()
public_key = private_key.public_key()
# ------------------------------------------------------------------------------
# encrypt/decrypt