aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2018-02-22 22:44:46 +0800
committerAlex Gaynor <alex.gaynor@gmail.com>2018-02-22 09:44:46 -0500
commit2c1277936be6ef927b968816adf7355a0cec8f9e (patch)
tree1e6d80500958e2eaac9e528ba7bc1913120246bd /docs
parent98cba4142c532e861afe609445d6b73bd1ee7b64 (diff)
downloadcryptography-2c1277936be6ef927b968816adf7355a0cec8f9e.tar.gz
cryptography-2c1277936be6ef927b968816adf7355a0cec8f9e.tar.bz2
cryptography-2c1277936be6ef927b968816adf7355a0cec8f9e.zip
switch RSA OAEP examples to use SHA256 (#4117)
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/primitives/asymmetric/rsa.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/hazmat/primitives/asymmetric/rsa.rst b/docs/hazmat/primitives/asymmetric/rsa.rst
index 4634dd45..46cc30af 100644
--- a/docs/hazmat/primitives/asymmetric/rsa.rst
+++ b/docs/hazmat/primitives/asymmetric/rsa.rst
@@ -247,8 +247,8 @@ options. Here's an example using a secure padding and hash function:
>>> ciphertext = public_key.encrypt(
... message,
... padding.OAEP(
- ... mgf=padding.MGF1(algorithm=hashes.SHA1()),
- ... algorithm=hashes.SHA1(),
+ ... mgf=padding.MGF1(algorithm=hashes.SHA256()),
+ ... algorithm=hashes.SHA256(),
... label=None
... )
... )
@@ -270,8 +270,8 @@ Once you have an encrypted message, it can be decrypted using the private key:
>>> plaintext = private_key.decrypt(
... ciphertext,
... padding.OAEP(
- ... mgf=padding.MGF1(algorithm=hashes.SHA1()),
- ... algorithm=hashes.SHA1(),
+ ... mgf=padding.MGF1(algorithm=hashes.SHA256()),
+ ... algorithm=hashes.SHA256(),
... label=None
... )
... )