diff options
author | Ayrx <terrycwk1994@gmail.com> | 2014-03-15 21:51:04 +0800 |
---|---|---|
committer | Ayrx <terrycwk1994@gmail.com> | 2014-03-15 21:51:04 +0800 |
commit | 30e574e8f0759a747f77e0e45fa5dbefeb44f3f0 (patch) | |
tree | a32b6765ba4ff5862c35b2b181443b2b181c6617 /docs | |
parent | b8a9c9e6243716b353b0786dae1e6e7d94f474a8 (diff) | |
download | cryptography-30e574e8f0759a747f77e0e45fa5dbefeb44f3f0.tar.gz cryptography-30e574e8f0759a747f77e0e45fa5dbefeb44f3f0.tar.bz2 cryptography-30e574e8f0759a747f77e0e45fa5dbefeb44f3f0.zip |
Added backend check to twofactor primitives
Diffstat (limited to 'docs')
-rw-r--r-- | docs/exceptions.rst | 6 | ||||
-rw-r--r-- | docs/hazmat/primitives/twofactor.rst | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/exceptions.rst b/docs/exceptions.rst index 48c4bca8..e5010ebe 100644 --- a/docs/exceptions.rst +++ b/docs/exceptions.rst @@ -56,3 +56,9 @@ Exceptions This is raised when the verify method of a one time password function's computed token does not match the expected token. +.. class:: UnsupportedInterface + + .. versionadded:: 0.3 + + This is raised when the provided backend does not support the required + interface. diff --git a/docs/hazmat/primitives/twofactor.rst b/docs/hazmat/primitives/twofactor.rst index 3912d483..124d0ef5 100644 --- a/docs/hazmat/primitives/twofactor.rst +++ b/docs/hazmat/primitives/twofactor.rst @@ -52,6 +52,9 @@ codes (HMAC). :class:`~cryptography.hazmat.primitives.hashes.SHA256()` or :class:`~cryptography.hazmat.primitives.hashes.SHA512()` or if the ``length`` parameter is not an integer. + :raises cryptography.exceptions.UnsupportedInterface: This is raised if the + provided ``backend`` does not implement + :class:`~cryptography.hazmat.backends.interfaces.HMACBackend` .. method:: generate(counter) @@ -148,6 +151,9 @@ similar to the following code. :class:`~cryptography.hazmat.primitives.hashes.SHA256()` or :class:`~cryptography.hazmat.primitives.hashes.SHA512()` or if the ``length`` parameter is not an integer. + :raises cryptography.exceptions.UnsupportedInterface: This is raised if the + provided ``backend`` does not implement + :class:`~cryptography.hazmat.backends.interfaces.HMACBackend` .. method:: generate(time) |