summaryrefslogtreecommitdiff
path: root/rsa/__init__.py
diff options
context:
space:
mode:
authorJustin Simon <jls5177@gmail.com>2017-05-07 04:39:47 -0500
committerSybren A. Stüvel <sybren@stuvel.eu>2017-05-07 11:39:47 +0200
commit425eb24854f1c3397aaaba61fa1cf71c76b27c4b (patch)
tree824a0e34f6bc4e88bbbb6bfa7e2f7a80d5399aa3 /rsa/__init__.py
parent000e84a97a8ab25a5d9b4185a2e02efc033f7e8a (diff)
downloadrsa-git-425eb24854f1c3397aaaba61fa1cf71c76b27c4b.tar.gz
Support signing a pre-calculated hash (#87)
* Split the hashing out of the sign method This code change adds support to split the hashing of a message and the actual signing of the message. * Updating unit test and documentation This commit updates the unit test and usage docs. In addition, This change removes a redundant error check inside rsa.sign(). * Refactore unit tests and code comments Removed the print statements from the unit test and refactored a few code comments to improve readability. * Rename hash function The new hash function had the same name as a function in the standard library. This commit changes the name to avoid conflicts. * Rename hash function to compute_hash() This commit renames the hash function to compute_hash().
Diffstat (limited to 'rsa/__init__.py')
-rw-r--r--rsa/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/rsa/__init__.py b/rsa/__init__.py
index 95cd3fd..ce3a341 100644
--- a/rsa/__init__.py
+++ b/rsa/__init__.py
@@ -25,7 +25,7 @@ prevent repetitions, or other common security improvements. Use with care.
from rsa.key import newkeys, PrivateKey, PublicKey
from rsa.pkcs1 import encrypt, decrypt, sign, verify, DecryptionError, \
- VerificationError, find_signature_hash
+ VerificationError, find_signature_hash, sign_hash, compute_hash
__author__ = "Sybren Stuvel, Barry Mead and Yesudeep Mangalapilly"
__date__ = "2016-03-29"
@@ -38,4 +38,5 @@ if __name__ == "__main__":
doctest.testmod()
__all__ = ["newkeys", "encrypt", "decrypt", "sign", "verify", 'PublicKey',
- 'PrivateKey', 'DecryptionError', 'VerificationError']
+ 'PrivateKey', 'DecryptionError', 'VerificationError',
+ 'compute_hash', 'sign_hash']