Skip to content

Commit

Permalink
Update test/test_crypto.py
Browse files Browse the repository at this point in the history
Co-authored-by: Michael Graeb <[email protected]>
  • Loading branch information
DmitriyMusatkin and graebm authored Nov 19, 2024
1 parent b11de0c commit 9a07371
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_crypto.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ def test_rsa_encryption_roundtrip_der(self):
for p in param_list:
with self.subTest(msg="RSA Encryption Roundtrip using algo p", p=p):
test_pt = b'totally original test string'
decoded_private_key = base64.b64decode(RSA_PRIVATE_KEY_DER)
rsa = RSA.new_private_key_from_der_data(decoded_private_key)
private_key_der_bytes = base64.b64decode(RSA_PRIVATE_KEY_DER_BASE64)
rsa = RSA.new_private_key_from_der_data(private_key_der_bytes)
ct = rsa.encrypt(p, test_pt)
pt = rsa.decrypt(p, ct)
self.assertEqual(test_pt, pt)
Expand Down

0 comments on commit 9a07371

Please sign in to comment.