diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-23 17:21:00 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2013-12-23 17:21:00 -0600 |
commit | 90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8 (patch) | |
tree | 25336e21264053b89aa445c0477df93c04eb0b9c /docs/hazmat/backends | |
parent | b8564e829306731f5133ac6bcbfc8e2f7e1a25f4 (diff) | |
download | cryptography-90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8.tar.gz cryptography-90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8.tar.bz2 cryptography-90ae866e0a83ef92ce2b2e7c58ccb86e79f3bee8.zip |
add hmac_supported method to backend.
Previously we were implicitly assuming that if a hash was supported then
its hmac equivalent was as well.
Diffstat (limited to 'docs/hazmat/backends')
-rw-r--r-- | docs/hazmat/backends/interfaces.rst | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst index b524943d..45fbaf09 100644 --- a/docs/hazmat/backends/interfaces.rst +++ b/docs/hazmat/backends/interfaces.rst @@ -126,12 +126,23 @@ A specific ``backend`` may provide one or more of these interfaces. A backend with methods for using cryptographic hash functions as message authentication codes. + .. method:: hmac_supported(algorithm) + + Check if the specified ``algorithm`` is supported by this backend. + + :param algorithm: An instance of a + :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` + provider. + + :returns: ``True`` if the specified ``algorithm`` is supported for HMAC + by this backend, otherwise ``False``. + .. method:: create_hmac_ctx(algorithm) Create a :class:`~cryptogrpahy.hazmat.primitives.interfaces.HashContext` that - uses the specified ``algorithm`` to calculate a hash-based message - authentication code. + uses the specified ``algorithm`` to calculate a hash-based message + authentication code. :param algorithm: An instance of a :class:`~cryptography.hazmat.primitives.interfaces.HashAlgorithm` |