From 92ec09ec0b127b67b794c250aa4d32c063ab66aa Mon Sep 17 00:00:00 2001 From: David Reid Date: Mon, 11 Nov 2013 15:53:52 -0800 Subject: flesh out method definitions. --- cryptography/hazmat/bindings/interfaces.py | 74 ++++++++++++++++++++++++++---- 1 file changed, 65 insertions(+), 9 deletions(-) diff --git a/cryptography/hazmat/bindings/interfaces.py b/cryptography/hazmat/bindings/interfaces.py index e9c8fef3..43563d13 100644 --- a/cryptography/hazmat/bindings/interfaces.py +++ b/cryptography/hazmat/bindings/interfaces.py @@ -22,36 +22,92 @@ class CiphersProviderBackend(six.with_metaclass(abc.ABCMeta)): @abc.abstractproperty def ciphers(self): """ + An instance of CiphersProvider """ class CiphersProvider(six.with_metaclass(abc.ABCMeta)): - """ - wat - """ + @abc.abstractmethod + def supported(self, cipher, mode): + """ + """ + + @abc.abstractmethod + def register_cipher_adapter(self, cipher, mode): + """ + """ + + @abc.abstractmethod + def create_encrypt_ctx(self, cipher, mode): + """ + """ + + @abc.abstractmethod + def create_decrypt_ctx(self, cipher, mode): + """ + """ class HashesProviderBackend(six.with_metaclass(abc.ABCMeta)): @abc.abstractproperty def hashes(self): """ + An instance of HashesProvider """ class HashesProvider(six.with_metaclass(abc.ABCMeta)): - """ - wat - """ + @abc.abstractmethod + def supported(self, algorithm): + """ + """ + + @abc.abstractmethod + def create_ctx(self, algorithm): + """ + """ + + @abc.abstractmethod + def update_ctx(self, ctx, data): + """ + """ + + @abc.abstractmethod + def finalize_ctx(self, ctx, digest_size): + """ + """ + + @abc.abstractmethod + def copy_ctx(self, ctx): + """ + """ class HMACsProviderBackend(six.with_metaclass(abc.ABCMeta)): @abc.abstractproperty def hmacs(self): """ + An instance of HMACsProvider """ class HMACsProvider(six.with_metaclass(abc.ABCMeta)): - """ - wat - """ + @abc.abstractmethod + def create_ctx(self, key, algorithm): + """ + """ + + @abc.abstractmethod + def update_ctx(self, ctx, data): + """ + """ + + @abc.abstractmethod + def finalize_ctx(self, ctx, digest_size): + """ + """ + + @abc.abstractmethod + def copy_ctx(self, ctx): + """ + """ -- cgit v1.2.3