summaryrefslogtreecommitdiff
path: root/src/cryptography/hazmat/primitives/_cipheralgorithm.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptography/hazmat/primitives/_cipheralgorithm.py')
-rw-r--r--src/cryptography/hazmat/primitives/_cipheralgorithm.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cryptography/hazmat/primitives/_cipheralgorithm.py b/src/cryptography/hazmat/primitives/_cipheralgorithm.py
index 6e6a79c11..138a104e2 100644
--- a/src/cryptography/hazmat/primitives/_cipheralgorithm.py
+++ b/src/cryptography/hazmat/primitives/_cipheralgorithm.py
@@ -10,19 +10,22 @@ import typing
class CipherAlgorithm(metaclass=abc.ABCMeta):
- @abc.abstractproperty
+ @property
+ @abc.abstractmethod
def name(self) -> str:
"""
A string naming this mode (e.g. "AES", "Camellia").
"""
- @abc.abstractproperty
+ @property
+ @abc.abstractmethod
def key_sizes(self) -> typing.FrozenSet[int]:
"""
Valid key sizes for this algorithm in bits
"""
- @abc.abstractproperty
+ @property
+ @abc.abstractmethod
def key_size(self) -> int:
"""
The size of the key being used as an integer in bits (e.g. 128, 256).
@@ -32,7 +35,8 @@ class CipherAlgorithm(metaclass=abc.ABCMeta):
class BlockCipherAlgorithm(metaclass=abc.ABCMeta):
key: bytes
- @abc.abstractproperty
+ @property
+ @abc.abstractmethod
def block_size(self) -> int:
"""
The size of a block as an integer in bits (e.g. 64, 128).