diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-11-29 16:35:04 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-11-29 17:19:46 -0600 |
commit | e0b5bb18c3963ebaa66d537d2cf00c2cc0dd804c (patch) | |
tree | 5396f13e34ab11fbd632713b66cbdc89f45476b9 | |
parent | 26c8c6adcb9a6485966070418080a17cd2445bed (diff) | |
download | cryptography-e0b5bb18c3963ebaa66d537d2cf00c2cc0dd804c.tar.gz cryptography-e0b5bb18c3963ebaa66d537d2cf00c2cc0dd804c.tar.bz2 cryptography-e0b5bb18c3963ebaa66d537d2cf00c2cc0dd804c.zip |
explicit backend fix for gcm docs
-rw-r--r-- | docs/hazmat/primitives/symmetric-encryption.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index a77e0e79..aefc2d7e 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -347,12 +347,12 @@ Modes .. doctest:: >>> from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes - >>> cipher = Cipher(algorithms.AES(key), modes.GCM(iv)) + >>> cipher = Cipher(algorithms.AES(key), modes.GCM(iv), backend) >>> encryptor = cipher.encryptor() >>> encryptor.authenticate_additional_data(b"authenticated but not encrypted payload") >>> ct = encryptor.update(b"a secret message") + encryptor.finalize() >>> tag = encryptor.tag - >>> cipher = Cipher(algorithms.AES(key), modes.GCM(iv, tag)) + >>> cipher = Cipher(algorithms.AES(key), modes.GCM(iv, tag), backend) >>> decryptor = cipher.decryptor() >>> decryptor.authenticate_additional_data(b"authenticated but not encrypted payload") >>> decryptor.update(ct) + decryptor.finalize() |