diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-02-23 19:28:44 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-02-25 22:59:03 -0600 |
commit | 4c0b4a99982138c4ab83dfffb19975a91c57d1ab (patch) | |
tree | 08ea255f32c234c4a3236e91666c95ed1c0a4b04 | |
parent | 42b3713eede3f5b417b0ce123fdcc9c4c24009d3 (diff) | |
download | cryptography-4c0b4a99982138c4ab83dfffb19975a91c57d1ab.tar.gz cryptography-4c0b4a99982138c4ab83dfffb19975a91c57d1ab.tar.bz2 cryptography-4c0b4a99982138c4ab83dfffb19975a91c57d1ab.zip |
more kwargs
-rw-r--r-- | docs/hazmat/primitives/asymmetric/rsa.rst | 6 | ||||
-rw-r--r-- | tests/hazmat/primitives/test_rsa.py | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst index 528b5324..198ed7a3 100644 --- a/docs/hazmat/primitives/asymmetric/rsa.rst +++ b/docs/hazmat/primitives/asymmetric/rsa.rst @@ -137,7 +137,11 @@ RSA >>> from cryptography.hazmat.backends import default_backend >>> from cryptography.hazmat.primitives import hashes >>> from cryptography.hazmat.primitives.asymmetric import rsa, padding - >>> private_key = rsa.RSAPrivateKey.generate(65537, 2048, default_backend()) + >>> private_key = rsa.RSAPrivateKey.generate( + ... public_exponent=65537, + ... key_size=2048, + ... backend=default_backend() + ... ) >>> signer = private_key.signer(padding.PKCS1(), hashes.SHA256(), default_backend()) >>> data= b"this is some data I'd like to sign" >>> signer.update(data) diff --git a/tests/hazmat/primitives/test_rsa.py b/tests/hazmat/primitives/test_rsa.py index 552bfc5f..fb4d1d77 100644 --- a/tests/hazmat/primitives/test_rsa.py +++ b/tests/hazmat/primitives/test_rsa.py @@ -457,7 +457,10 @@ class TestRSAVerification(object): ) def test_pkcs1v15_verification(self, pkcs1_example, backend): private, public, example = pkcs1_example - public_key = rsa.RSAPublicKey(**public) + public_key = rsa.RSAPublicKey( + public_exponent=public["public_exponent"], + modulus=public["modulus"] + ) verifier = public_key.verifier( binascii.unhexlify(example["signature"]), padding.PKCS1(), |