summaryrefslogtreecommitdiffstats
path: root/Doc/library/hashlib.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-22 08:58:03 (GMT)
committerGitHub <noreply@github.com>2024-05-22 08:58:03 (GMT)
commit9bd9879ca7d9af7d62c53f0a8ca5d2b1e900cc4b (patch)
tree3037b97a5e833756ab3b60831d65a4a86e68a348 /Doc/library/hashlib.rst
parent9801fbad67b709bce92a2f78bf7411e66b9a7ea6 (diff)
downloadcpython-9bd9879ca7d9af7d62c53f0a8ca5d2b1e900cc4b.zip
cpython-9bd9879ca7d9af7d62c53f0a8ca5d2b1e900cc4b.tar.gz
cpython-9bd9879ca7d9af7d62c53f0a8ca5d2b1e900cc4b.tar.bz2
[3.12] Clarify that dklen is expected in bytes for the hashlib functions (GH-106624) (GH-119384)
(cherry picked from commit 5adf78f546a5dc3f5b8eeaa209a2e8437ae96ac8) Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
Diffstat (limited to 'Doc/library/hashlib.rst')
-rw-r--r--Doc/library/hashlib.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/hashlib.rst b/Doc/library/hashlib.rst
index 4b4d837..8f4c42d 100644
--- a/Doc/library/hashlib.rst
+++ b/Doc/library/hashlib.rst
@@ -328,7 +328,7 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
your application, read *Appendix A.2.2* of NIST-SP-800-132_. The answers
on the `stackexchange pbkdf2 iterations question`_ explain in detail.
- *dklen* is the length of the derived key. If *dklen* is ``None`` then the
+ *dklen* is the length of the derived key in bytes. If *dklen* is ``None`` then the
digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512.
>>> from hashlib import pbkdf2_hmac
@@ -357,7 +357,7 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization
factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB).
- *dklen* is the length of the derived key.
+ *dklen* is the length of the derived key in bytes.
.. versionadded:: 3.6