aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cryptography/hazmat/primitives/interfaces.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py
index e70338ba..ec970e68 100644
--- a/cryptography/hazmat/primitives/interfaces.py
+++ b/cryptography/hazmat/primitives/interfaces.py
@@ -457,3 +457,23 @@ class KeyDerivationFunction(object):
Checks whether the key generated by the key material matches the
expected derived key. Raises an exception if they do not match.
"""
+
+
+@six.add_metaclass(abc.ABCMeta)
+class CMACContext(object):
+ @abc.abstractmethod
+ def update(self, data):
+ """
+ Processes the provided bytes.
+ """
+
+ def finalize(self):
+ """
+ Returns the results of processing the final block as bytes.
+ """
+
+ @abc.abstractmethod
+ def copy(self):
+ """
+ Return a CMACContext that is a copy of the current context.
+ """