aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography/hazmat/primitives/interfaces.py
diff options
context:
space:
mode:
Diffstat (limited to 'cryptography/hazmat/primitives/interfaces.py')
-rw-r--r--cryptography/hazmat/primitives/interfaces.py17
1 files changed, 12 insertions, 5 deletions
diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py
index 67dbe6fa..8cc9d42c 100644
--- a/cryptography/hazmat/primitives/interfaces.py
+++ b/cryptography/hazmat/primitives/interfaces.py
@@ -18,11 +18,18 @@ import abc
import six
-def register(iface):
- def register_decorator(klass):
- iface.register(klass)
- return klass
- return register_decorator
+class CipherAlgorithm(six.with_metaclass(abc.ABCMeta)):
+ @abc.abstractproperty
+ def name(self):
+ """
+ A string naming this mode. (e.g. AES, Camellia)
+ """
+
+ @abc.abstractproperty
+ def key_size(self):
+ """
+ The size of the key being used as an integer in bits. (e.g. 128, 256)
+ """
class Mode(six.with_metaclass(abc.ABCMeta)):