diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-04-20 10:25:48 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-04-20 16:53:04 -0500 |
commit | 8e764396471beb13d0cdfbc9a299b9445f96abb2 (patch) | |
tree | 2e4ee7f670cd5de0da24929453d67900728223e1 /tests/hazmat/primitives/test_rsa.py | |
parent | 8ab7a360330daa195ea1c0cf70d606dc7dce88c8 (diff) | |
download | cryptography-8e764396471beb13d0cdfbc9a299b9445f96abb2.tar.gz cryptography-8e764396471beb13d0cdfbc9a299b9445f96abb2.tar.bz2 cryptography-8e764396471beb13d0cdfbc9a299b9445f96abb2.zip |
more key length checks, docs update
Diffstat (limited to 'tests/hazmat/primitives/test_rsa.py')
-rw-r--r-- | tests/hazmat/primitives/test_rsa.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index 69fd2933..a5266d57 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -1249,8 +1249,10 @@ class TestRSADecryption(object): public_exponent=private["public_exponent"], modulus=private["modulus"] ) + ciphertext = binascii.unhexlify(example["encryption"]) + assert len(ciphertext) == math.ceil(skey.key_size / 8.0) message = skey.decrypt( - binascii.unhexlify(example["encryption"]), + ciphertext, padding.PKCS1v15(), backend ) |