diff options
author | David Reid <dreid@dreid.org> | 2014-02-03 16:46:48 -0800 |
---|---|---|
committer | David Reid <dreid@dreid.org> | 2014-02-03 16:46:48 -0800 |
commit | ba5fcd97baf193259a156caa5b5cbc107ee46794 (patch) | |
tree | cf0243617ef483300973442a55e7a1fdc02ff1ff /docs/hazmat | |
parent | 59ca2fc4a93ed398e5c2674b7c98a81ed95e0930 (diff) | |
parent | db80954cf1448f88fae78568dbd3d833da04054a (diff) | |
download | cryptography-ba5fcd97baf193259a156caa5b5cbc107ee46794.tar.gz cryptography-ba5fcd97baf193259a156caa5b5cbc107ee46794.tar.bz2 cryptography-ba5fcd97baf193259a156caa5b5cbc107ee46794.zip |
Merge pull request #536 from alex/prioritized-multi-backend
Initial work on a prioritized multibackend for which implements CipherBackend
Diffstat (limited to 'docs/hazmat')
-rw-r--r-- | docs/hazmat/backends/index.rst | 1 | ||||
-rw-r--r-- | docs/hazmat/backends/multibackend.rst | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/docs/hazmat/backends/index.rst b/docs/hazmat/backends/index.rst index dbc0724e..983a44e9 100644 --- a/docs/hazmat/backends/index.rst +++ b/docs/hazmat/backends/index.rst @@ -32,4 +32,5 @@ Individual Backends openssl commoncrypto + multibackend interfaces diff --git a/docs/hazmat/backends/multibackend.rst b/docs/hazmat/backends/multibackend.rst new file mode 100644 index 00000000..63177bef --- /dev/null +++ b/docs/hazmat/backends/multibackend.rst @@ -0,0 +1,28 @@ +.. 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 + 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. |