aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2013-11-06 15:00:19 -0800
committerDavid Reid <dreid@dreid.org>2013-11-06 15:00:19 -0800
commit2c0c91e6ed245d6363828458020e90ec0670ed24 (patch)
treee03bd91f039b4d8a14d0558213cd5a19bc8c60dd
parent60d4c68845aff3d44902cb978231fa01a5e74359 (diff)
downloadcryptography-2c0c91e6ed245d6363828458020e90ec0670ed24.tar.gz
cryptography-2c0c91e6ed245d6363828458020e90ec0670ed24.tar.bz2
cryptography-2c0c91e6ed245d6363828458020e90ec0670ed24.zip
Actually note the properties for cipher modes types on their ABCs.
-rw-r--r--cryptography/hazmat/primitives/interfaces.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py
index ebf5e31e..d6a05c18 100644
--- a/cryptography/hazmat/primitives/interfaces.py
+++ b/cryptography/hazmat/primitives/interfaces.py
@@ -26,11 +26,19 @@ def register(iface):
class ModeWithInitializationVector(six.with_metaclass(abc.ABCMeta)):
- pass
+ @abc.abstractproperty
+ def iv(self):
+ """
+ The value of the initialization vector for this mode.
+ """
class ModeWithNonce(six.with_metaclass(abc.ABCMeta)):
- pass
+ @abc.abstractproperty
+ def nonce(self):
+ """
+ The value of the nonce for this mode.
+ """
class CipherContext(six.with_metaclass(abc.ABCMeta)):