summaryrefslogtreecommitdiff
path: root/rsa
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@stuvel.eu>2022-07-20 11:00:13 +0200
committerSybren A. Stüvel <sybren@stuvel.eu>2022-07-20 11:28:13 +0200
commitce5a32f3fdbcb5128800719e2c3d68e6248d3e47 (patch)
tree535084815d7ed9ae22fd1910e0d87d3afbeaf620 /rsa
parent0e3e54859f85d352e6a71f4069f5481b03d9e4e8 (diff)
downloadrsa-git-ce5a32f3fdbcb5128800719e2c3d68e6248d3e47.tar.gz
Fix #199: Sphinx warnings reference target not found
Fix the documentation by adding referenced-but-not-included functions and some other small fixes. The only warnings left are: ``` python-rsa/rsa/key.py:docstring of rsa.key.AbstractKey.load_pkcs1:: WARNING: py:class reference target not found: rsa.key.T python-rsa/rsa/key.py:docstring of rsa.key.AbstractKey.load_pkcs1:: WARNING: py:class reference target not found: rsa.key.T ``` These are due to Sphynx not really understanding `typing` type references. Not sure how to fix those.
Diffstat (limited to 'rsa')
-rw-r--r--rsa/pkcs1.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/rsa/pkcs1.py b/rsa/pkcs1.py
index 3837a69..ec6998e 100644
--- a/rsa/pkcs1.py
+++ b/rsa/pkcs1.py
@@ -57,6 +57,7 @@ HASH_METHODS: typing.Dict[str, typing.Callable[[], HashType]] = {
"SHA-384": hashlib.sha384,
"SHA-512": hashlib.sha512,
}
+"""Hash methods supported by this library."""
if sys.version_info >= (3, 6):
@@ -423,7 +424,7 @@ def compute_hash(message: typing.Union[bytes, typing.BinaryIO], method_name: str
object. If ``message`` has a ``read()`` method, it is assumed to be a
file-like object.
:param method_name: the hash method, must be a key of
- :py:const:`HASH_METHODS`.
+ :py:const:`rsa.pkcs1.HASH_METHODS`.
"""