diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-11-20 23:45:06 +0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2016-11-20 10:45:06 -0500 |
commit | 6012ccff0d709a80259f93a406eca5d133b40108 (patch) | |
tree | 6aab57ae422206aee4c21f318c7a30ed38fffdfb /docs/hazmat/primitives/asymmetric | |
parent | f555c74d5419a52648e2a903595c13bd13d13ce2 (diff) | |
download | cryptography-6012ccff0d709a80259f93a406eca5d133b40108.tar.gz cryptography-6012ccff0d709a80259f93a406eca5d133b40108.tar.bz2 cryptography-6012ccff0d709a80259f93a406eca5d133b40108.zip |
support prehashed sign/verify in DSA (#3266)
Diffstat (limited to 'docs/hazmat/primitives/asymmetric')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/dsa.rst | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/docs/hazmat/primitives/asymmetric/dsa.rst b/docs/hazmat/primitives/asymmetric/dsa.rst index 126cdc28..d4c25256 100644 --- a/docs/hazmat/primitives/asymmetric/dsa.rst +++ b/docs/hazmat/primitives/asymmetric/dsa.rst @@ -301,6 +301,9 @@ Key interfaces .. method:: sign(data, algorithm) .. versionadded:: 1.5 + .. versionchanged:: 1.6 + :class:`~cryptography.hazmat.primitives.asymmetric.utils.Prehashed` + can now be used as an ``algorithm``. Sign one block of data which can be verified later by others using the public key. @@ -308,7 +311,9 @@ Key interfaces :param bytes data: The message string to sign. :param algorithm: An instance of - :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`. + :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm` or + :class:`~cryptography.hazmat.primitives.asymmetric.utils.Prehashed` + if the ``data`` you want to sign has already been hashed. :return bytes: Signature. @@ -424,6 +429,9 @@ Key interfaces .. method:: verify(signature, data, algorithm) .. versionadded:: 1.5 + .. versionchanged:: 1.6 + :class:`~cryptography.hazmat.primitives.asymmetric.utils.Prehashed` + can now be used as an ``algorithm``. Verify one block of data was signed by the private key associated with this public key. @@ -433,7 +441,9 @@ Key interfaces :param bytes data: The message string that was signed. :param algorithm: An instance of - :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm`. + :class:`~cryptography.hazmat.primitives.hashes.HashAlgorithm` or + :class:`~cryptography.hazmat.primitives.asymmetric.utils.Prehashed` + if the ``data`` you want to sign has already been hashed. :raises cryptography.exceptions.InvalidSignature: If the signature does not validate. |