From 327076a17670f35e8f660a62d6c633025f600e28 Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 18 Nov 2013 14:03:03 -0800 Subject: Some docstrings. --- cryptography/hazmat/bindings/interfaces.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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. """ -- cgit v1.2.3