aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-02-03 16:15:06 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-02-03 16:15:06 -0800
commit559885087728c0233b243756fe698e4071fab971 (patch)
tree53798ca6a32f26464c34ec5b24aff65e670d53fa /docs
parent53f6dbca6e5a5a727c58e6c1fc320e09503d1cba (diff)
downloadcryptography-559885087728c0233b243756fe698e4071fab971.tar.gz
cryptography-559885087728c0233b243756fe698e4071fab971.tar.bz2
cryptography-559885087728c0233b243756fe698e4071fab971.zip
Added an example usage
Diffstat (limited to 'docs')
-rw-r--r--docs/hazmat/backends/multibackend.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/docs/hazmat/backends/multibackend.rst b/docs/hazmat/backends/multibackend.rst
index 971c7671..f1a88006 100644
--- a/docs/hazmat/backends/multibackend.rst
+++ b/docs/hazmat/backends/multibackend.rst
@@ -10,5 +10,17 @@ MultiBackend
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.