aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/primitives/symmetric-encryption.rst
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-20 15:05:27 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-01-20 15:05:27 -0600
commit81a68fc96d0845f5ee812665405276a935d05a79 (patch)
tree0478a737c0db71df5bee8f1b02d2a89713590867 /docs/hazmat/primitives/symmetric-encryption.rst
parent74169660e47b760f82c0653b4210b3bc5d3bf46b (diff)
parent78456c71627d9234a4668ce2fb36e12525cae6b1 (diff)
downloadcryptography-81a68fc96d0845f5ee812665405276a935d05a79.tar.gz
cryptography-81a68fc96d0845f5ee812665405276a935d05a79.tar.bz2
cryptography-81a68fc96d0845f5ee812665405276a935d05a79.zip
Merge branch 'master' into urandom-engine
* master: (58 commits) Moar backtick. Add to changelog. move some dashes around :) experiment to disable duplicate cc test runs on osx and speed up travis Remove register_cipher_adapter from the interface and the documentation. expand tox backend example On OS X at build time compile the CC bindings remove an extraneous linefeed reformat bindings and remove GCM for the moment add cipher bindings for CommonCrypto doc updates hmac support for commoncrypto added versionadded changelog to note addition of commoncrypto backend with hash support fix docs doc updates update docs for name attribute fix copy mistake in docs increase indent and note the value of the attribute in the docs move HashMethods to top level ...
Diffstat (limited to 'docs/hazmat/primitives/symmetric-encryption.rst')
-rw-r--r--docs/hazmat/primitives/symmetric-encryption.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/symmetric-encryption.rst b/docs/hazmat/primitives/symmetric-encryption.rst
index 83165690..7d954046 100644
--- a/docs/hazmat/primitives/symmetric-encryption.rst
+++ b/docs/hazmat/primitives/symmetric-encryption.rst
@@ -324,6 +324,11 @@ Modes
return (iv, ciphertext, encryptor.tag)
def decrypt(key, associated_data, iv, ciphertext, tag):
+ if len(tag) != 16:
+ raise ValueError(
+ "tag must be 16 bytes -- truncation not supported"
+ )
+
# Construct a Cipher object, with the key, iv, and additionally the
# GCM tag used for authenticating the message.
decryptor = Cipher(