diff options
author | Moritz Fischer <moritzf@google.com> | 2022-11-23 09:20:33 -0800 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2023-04-23 15:40:09 +0200 |
commit | 069f6391bc0f32bfbc2a6c5bab1581dbf58beef2 (patch) | |
tree | 3dcb80b6cf7db15d093253002d2926e4abad4d3b | |
parent | b94766f775aa3cdc541a66355cb00e439aab3e55 (diff) | |
download | rsa-git-069f6391bc0f32bfbc2a6c5bab1581dbf58beef2.tar.gz |
rsa/pkcs1.py: Clarify functionality of sign_hash()
Clarify functionality that a hash is not computed, rather
a precomputed (given) hash is being signed.
Signed-off-by: Moritz Fischer <moritzf@google.com>
-rw-r--r-- | rsa/pkcs1.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rsa/pkcs1.py b/rsa/pkcs1.py index ec6998e..bbfdee6 100644 --- a/rsa/pkcs1.py +++ b/rsa/pkcs1.py @@ -287,8 +287,8 @@ def decrypt(crypto: bytes, priv_key: key.PrivateKey) -> bytes: def sign_hash(hash_value: bytes, priv_key: key.PrivateKey, hash_method: str) -> bytes: """Signs a precomputed hash with the private key. - Hashes the message, then signs the hash with the given key. This is known - as a "detached signature", because the message itself isn't altered. + Signs the hash with the given key. This is known as a "detached signature", + because the message itself isn't altered. :param hash_value: A precomputed hash to sign (ignores message). :param priv_key: the :py:class:`rsa.PrivateKey` to sign with |