Added an example usage
diff --git a/cryptography/hazmat/backends/__init__.py b/cryptography/hazmat/backends/__init__.py
index 41d260a..d1b95f2 100644
--- a/cryptography/hazmat/backends/__init__.py
+++ b/cryptography/hazmat/backends/__init__.py
@@ -12,7 +12,6 @@
# limitations under the License.
from cryptography.hazmat.backends import openssl
-from cryptography.hazmat.backends.multibackend import MultiBackend
from cryptography.hazmat.bindings.commoncrypto.binding import (
Binding as CommonCryptoBinding
)
@@ -24,8 +23,5 @@
_ALL_BACKENDS.append(commoncrypto.backend)
-_default_backend = MultiBackend(_ALL_BACKENDS)
-
-
def default_backend():
- return _default_backend
+ return openssl.backend
diff --git a/docs/hazmat/backends/multibackend.rst b/docs/hazmat/backends/multibackend.rst
index 971c767..f1a8800 100644
--- a/docs/hazmat/backends/multibackend.rst
+++ b/docs/hazmat/backends/multibackend.rst
@@ -10,5 +10,17 @@
This class allows you to combine multiple backends into a single backend
which offers the combined features of all of its constituents.
+ .. code-block:: pycon
+
+ >>> from cryptography.hazmat.backends.multibackend import MultiBackend
+ >>> from cryptography.hazmat.primitives import hashes
+ >>> backend1.hash_supported(hashes.SHA256())
+ False
+ >>> backend2.hash_supported(hashes.SHA1())
+ True
+ >>> multi_backend = MultiBackend([backend1, backend2])
+ >>> multi_backend.hash_supported(hashes.SHA1())
+ True
+
:param backends: A ``list`` of backend objects. Backends are checked for
feature support in the order they appear in this list.