aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/hazmat/backends/interfaces.py4
-rw-r--r--docs/hazmat/backends/interfaces.rst7
2 files changed, 7 insertions, 4 deletions
diff --git a/cryptography/hazmat/backends/interfaces.py b/cryptography/hazmat/backends/interfaces.py
index 4137b534..92413d8c 100644
--- a/cryptography/hazmat/backends/interfaces.py
+++ b/cryptography/hazmat/backends/interfaces.py
@@ -147,9 +147,9 @@ class OpenSSLSerializationBackend(object):
@six.add_metaclass(abc.ABCMeta)
class CMACBackend(object):
@abc.abstractmethod
- def cmac_supported(self):
+ def cmac_algorithm_supported(self, algorithm):
"""
- Returns True if the backend supports CMAC
+ Returns True if the block cipher is supported for CMAC by this backend
"""
@abc.abstractmethod
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 546aa766..394d060b 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -327,9 +327,12 @@ A specific ``backend`` may provide one or more of these interfaces.
A backend with methods for using CMAC
- .. method:: cmac_supported()
+ .. method:: cmac_algorithm_supported(algorithm)
- :return: True if CMAC is supported by the backend. False if otherwise.
+ :param algorithm: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.BlockCipherAlgorithm`
+ provider.
+ :return: Returns True if the block cipher is supported for CMAC by this backend
.. method:: create_cmac_ctx(algorithm)