mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user