Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f757996

Browse filesBrowse files
[3.13] Clarify that dklen is expected in bytes for the hashlib functions (GH-106624) (GH-119383)
(cherry picked from commit 5adf78f) Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
1 parent b5b0e32 commit f757996
Copy full SHA for f757996

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎Doc/library/hashlib.rst

Copy file name to clipboardExpand all lines: Doc/library/hashlib.rst
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
328328
your application, read *Appendix A.2.2* of NIST-SP-800-132_. The answers
329329
on the `stackexchange pbkdf2 iterations question`_ explain in detail.
330330

331-
*dklen* is the length of the derived key. If *dklen* is ``None`` then the
331+
*dklen* is the length of the derived key in bytes. If *dklen* is ``None`` then the
332332
digest size of the hash algorithm *hash_name* is used, e.g. 64 for SHA-512.
333333

334334
>>> from hashlib import pbkdf2_hmac
@@ -357,7 +357,7 @@ include a `salt <https://en.wikipedia.org/wiki/Salt_%28cryptography%29>`_.
357357

358358
*n* is the CPU/Memory cost factor, *r* the block size, *p* parallelization
359359
factor and *maxmem* limits memory (OpenSSL 1.1.0 defaults to 32 MiB).
360-
*dklen* is the length of the derived key.
360+
*dklen* is the length of the derived key in bytes.
361361

362362
.. versionadded:: 3.6
363363

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.