aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2013-11-18 14:03:03 -0800
committerDavid Reid <dreid@dreid.org>2013-11-18 14:03:03 -0800
commit327076a17670f35e8f660a62d6c633025f600e28 (patch)
tree88e5b2dc8eff6a1c6322520870f042a30f34b4d5
parent08fc60b6544c8814e5723a39643ab03af054c84f (diff)
downloadcryptography-327076a17670f35e8f660a62d6c633025f600e28.tar.gz
cryptography-327076a17670f35e8f660a62d6c633025f600e28.tar.bz2
cryptography-327076a17670f35e8f660a62d6c633025f600e28.zip
Some docstrings.
-rw-r--r--cryptography/hazmat/bindings/interfaces.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/interfaces.py b/cryptography/hazmat/bindings/interfaces.py
index ffcd5f14..912476bb 100644
--- a/cryptography/hazmat/bindings/interfaces.py
+++ b/cryptography/hazmat/bindings/interfaces.py
@@ -22,21 +22,25 @@ class CipherBackend(six.with_metaclass(abc.ABCMeta)):
@abc.abstractmethod
def cipher_supported(self, cipher, mode):
"""
+ Return True if the given cipher and mode are supported.
"""
@abc.abstractmethod
- def register_cipher_adapter(self, cipher, mode):
+ def register_cipher_adapter(self, cipher, mode, adapter):
"""
+ Register an adapter for a cipher and mode to a backend specific object.
"""
@abc.abstractmethod
def create_symmetric_encryption_ctx(self, cipher, mode):
"""
+ Get a CipherContext that can be used for encryption.
"""
@abc.abstractmethod
def create_symmetric_decryption_ctx(self, cipher, mode):
"""
+ Get a CipherContext that can be used for decryption.
"""
@@ -44,11 +48,13 @@ class HashBackend(six.with_metaclass(abc.ABCMeta)):
@abc.abstractmethod
def hash_supported(self, algorithm):
"""
+ Return True if the hash algorithm is supported by this backend.
"""
@abc.abstractmethod
def create_hash_ctx(self, algorithm):
"""
+ Create a HashContext for calculating a message digest.
"""
@@ -56,4 +62,5 @@ class HMACBackend(six.with_metaclass(abc.ABCMeta)):
@abc.abstractmethod
def create_hmac_ctx(self, key, algorithm):
"""
+ Create a HashContext for calculating a message authentication code.
"""