diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2017-05-20 13:25:47 -0700 | 
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2017-05-20 13:25:47 -0700 | 
| commit | a4668c6593005822ff6d655b7034e1c5eebfa1fd (patch) | |
| tree | 4d65363dc949e46e9cd3155a791f159ac7ad4b69 /docs/hazmat | |
| parent | 2240ba2d9bf3d0bb81b30d2901304983f8a0983e (diff) | |
| download | cryptography-a4668c6593005822ff6d655b7034e1c5eebfa1fd.tar.gz cryptography-a4668c6593005822ff6d655b7034e1c5eebfa1fd.tar.bz2 cryptography-a4668c6593005822ff6d655b7034e1c5eebfa1fd.zip  | |
remove multibackend (#3555)
* remove multibackend
* oops
* goodbye pointless tests
Diffstat (limited to 'docs/hazmat')
| -rw-r--r-- | docs/hazmat/backends/index.rst | 9 | ||||
| -rw-r--r-- | docs/hazmat/backends/multibackend.rst | 45 | 
2 files changed, 2 insertions, 52 deletions
diff --git a/docs/hazmat/backends/index.rst b/docs/hazmat/backends/index.rst index 56d18901..a8a1ff30 100644 --- a/docs/hazmat/backends/index.rst +++ b/docs/hazmat/backends/index.rst @@ -8,15 +8,11 @@ Getting a backend  .. currentmodule:: cryptography.hazmat.backends -``cryptography`` aims to support multiple backends to ensure it can provide -the widest number of supported cryptographic algorithms as well as supporting -platform specific implementations. +``cryptography`` was originally designed to support multiple backends, but +this design has been deprecated.  You can get the default backend by calling :func:`~default_backend`. -The default backend will change over time as we implement new backends and -the libraries we use in those backends changes. -  .. function:: default_backend() @@ -31,5 +27,4 @@ Individual backends      :maxdepth: 1      openssl -    multibackend      interfaces diff --git a/docs/hazmat/backends/multibackend.rst b/docs/hazmat/backends/multibackend.rst deleted file mode 100644 index 0aae04a7..00000000 --- a/docs/hazmat/backends/multibackend.rst +++ /dev/null @@ -1,45 +0,0 @@ -.. hazmat:: - -MultiBackend -============ - -.. currentmodule:: cryptography.hazmat.backends.multibackend - -.. class:: MultiBackend(backends) - -    .. versionadded:: 0.2 - -    This class allows you to combine multiple backends into a single backend -    that offers the combined features of all of its constituents. - -    .. testsetup:: - -        from cryptography import utils -        from cryptography.exceptions import UnsupportedAlgorithm, _Reasons -        from cryptography.hazmat.backends.interfaces import HashBackend -        from cryptography.hazmat.backends.openssl.backend import backend as backend2 - -        @utils.register_interface(HashBackend) -        class DummyHashBackend(object): -            def hash_supported(self, algorithm): -                return False - -            def create_hash_ctx(self, algorithm): -                raise UnsupportedAlgorithm("", _Reasons.UNSUPPORTED_HASH) - -        backend1 = DummyHashBackend() - -    .. doctest:: - -        >>> from cryptography.hazmat.backends.multibackend import MultiBackend -        >>> from cryptography.hazmat.primitives import hashes -        >>> backend1.hash_supported(hashes.SHA256()) -        False -        >>> backend2.hash_supported(hashes.SHA256()) -        True -        >>> multi_backend = MultiBackend([backend1, backend2]) -        >>> multi_backend.hash_supported(hashes.SHA256()) -        True - -    :param backends: A ``list`` of backend objects. Backends are checked for -                     feature support in the order they appear in this list.  | 
