From 2c0c91e6ed245d6363828458020e90ec0670ed24 Mon Sep 17 00:00:00 2001 From: David Reid Date: Wed, 6 Nov 2013 15:00:19 -0800 Subject: Actually note the properties for cipher modes types on their ABCs. --- cryptography/hazmat/primitives/interfaces.py | 12 ++++++++++-- 1 file 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)): -- cgit v1.2.3