From 846460ae25554cbf007c0b65f8d7997d543ea53e Mon Sep 17 00:00:00 2001 From: David Reid Date: Wed, 6 Nov 2013 11:24:50 -0800 Subject: Fix doctests. --- docs/hazmat/primitives/cryptographic-hashes.rst | 1 + docs/hazmat/primitives/symmetric-encryption.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/hazmat') diff --git a/docs/hazmat/primitives/cryptographic-hashes.rst b/docs/hazmat/primitives/cryptographic-hashes.rst index b3db9f19..f05b45a5 100644 --- a/docs/hazmat/primitives/cryptographic-hashes.rst +++ b/docs/hazmat/primitives/cryptographic-hashes.rst @@ -19,6 +19,7 @@ Message Digests various message digests. .. doctest:: + >>> from cryptography.hazmat.bindings import default_backend >>> from cryptography.hazmat.primitives import hashes >>> digest = hashes.Hash(hashes.SHA256(), default_backend()) diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst index 42d2090c..e7d019da 100644 --- a/docs/hazmat/primitives/symmetric-encryption.rst +++ b/docs/hazmat/primitives/symmetric-encryption.rst @@ -36,7 +36,7 @@ an "encrypt-then-MAC" formulation as `described by Colin Percival`_. .. doctest:: - >>> from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, mode + >>> from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes >>> cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend) >>> encryptor = cipher.encryptor() >>> ct = encryptor.update(b"a secret message") + encryptor.finalize() -- cgit v1.2.3