Calling @dreid to the thread :-)


On Mon, Jan 20, 2014 at 8:48 AM, Paul Kehrer <notifications@github.com>wrote:

> In cryptography/hazmat/backends/commoncrypto/backend.py:
>
> > @@ -98,6 +107,181 @@ def create_hash_ctx(self, algorithm):
> >      def create_hmac_ctx(self, key, algorithm):
> >          return _HMACContext(self, key, algorithm)
> >
> > +    def cipher_supported(self, cipher, mode):
> > +        try:
> > +            self._cipher_registry[type(cipher), type(mode)]
> > +        except KeyError:
> > +            return False
> > +        return True
> > +
> > +    def create_symmetric_encryption_ctx(self, cipher, mode):
> > +        return _CipherContext(self, cipher, mode, _CipherContext._ENCRYPT)
> > +
> > +    def create_symmetric_decryption_ctx(self, cipher, mode):
> > +        return _CipherContext(self, cipher, mode, _CipherContext._DECRYPT)
> > +
> > +    def register_cipher_adapter(self, cipher_cls, cipher_const, mode_cls,
> > +                                mode_const):
>
> Playing devil's advocate, why do we have register_cipher_adapter listed
> as part of our public interface for CipherBackend? Won't the backend
> already register everything that's available upon instantiation so there's
> no need for user interaction?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/pyca/cryptography/pull/486/files#r9006543>
> .
>



-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084