aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-23 17:25:54 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2013-12-23 17:25:54 -0600
commit4f776c495cfef4dd29023cb7bb035612d1e53916 (patch)
treeb4e5596856f115b0325909a21194e76ce1f8c472 /cryptography
parent90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8 (diff)
downloadcryptography-4f776c495cfef4dd29023cb7bb035612d1e53916.tar.gz
cryptography-4f776c495cfef4dd29023cb7bb035612d1e53916.tar.bz2
cryptography-4f776c495cfef4dd29023cb7bb035612d1e53916.zip
fix erroneous indent and add abstractmethod to HMACBackend
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/backends/interfaces.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/cryptography/hazmat/backends/interfaces.py b/cryptography/hazmat/backends/interfaces.py
index 912476bb..9a570968 100644
--- a/cryptography/hazmat/backends/interfaces.py
+++ b/cryptography/hazmat/backends/interfaces.py
@@ -60,6 +60,13 @@ class HashBackend(six.with_metaclass(abc.ABCMeta)):
class HMACBackend(six.with_metaclass(abc.ABCMeta)):
@abc.abstractmethod
+ def hmac_supported(self, algorithm):
+ """
+ Return True if the hash algorithm is supported for HMAC by this
+ backend.
+ """
+
+ @abc.abstractmethod
def create_hmac_ctx(self, key, algorithm):
"""
Create a HashContext for calculating a message authentication code.