Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit5adf78f

Browse files
authored
Clarify that dklen is expected in bytes for the hashlib functions (GH-106624)
1 parent31d61a7 commit5adf78f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Doc/library/hashlib.rst‎

Lines 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* ofNIST-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 hashlibimport 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)

[8]ページ先頭

©2009-2025 Movatter.jp