aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/symmetric-encryption.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-29 16:35:04 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-11-29 17:19:46 -0600
commite0b5bb18c3963ebaa66d537d2cf00c2cc0dd804c (patch)
tree5396f13e34ab11fbd632713b66cbdc89f45476b9 /docs/hazmat/primitives/symmetric-encryption.rst
parent26c8c6adcb9a6485966070418080a17cd2445bed (diff)
downloadcryptography-e0b5bb18c3963ebaa66d537d2cf00c2cc0dd804c.tar.gz
cryptography-e0b5bb18c3963ebaa66d537d2cf00c2cc0dd804c.tar.bz2
cryptography-e0b5bb18c3963ebaa66d537d2cf00c2cc0dd804c.zip
explicit backend fix for gcm docs
Diffstat (limited to 'docs/hazmat/primitives/symmetric-encryption.rst')
-rw-r--r--docs/hazmat/primitives/symmetric-encryption.rst4
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()