Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Added documentation describing the dklen is expected in bytes for the…#106624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
… hashlib.pbkdf2_hmac function.
ghost commentedJul 11, 2023 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There is a similar case in the documentation forscrypt()
few lines below. Please add "in bytes" there too.
Updated dklen documentation for scrypt() to include 'in bytes' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
Thanks@thiezn for the PR, and@serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
…thonGH-106624)(cherry picked from commit5adf78f)Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
…thonGH-106624)(cherry picked from commit5adf78f)Co-authored-by: Mathijs Mortimer <thiezn@users.noreply.github.com>
GH-119383 is a backport of this pull request to the3.13 branch. |
GH-119384 is a backport of this pull request to the3.12 branch. |
Uh oh!
There was an error while loading.Please reload this page.
Update hashlib.pbkdf2_hmac docs that dklen is in bytes
Thehashlib.pbkfdf2_hmac documentation states that you can pass on the length of the derived key. It is however ambiguous if it's meant to be passed on as bytes or bits.
The CPython implementation relies on the OpenSSL C library. Looking at the OpenSSL source code, the function is expected to be in bytes.
Although this might be obvious to most people, some otherlanguage libraries handle this in bits.
Ps. This is my first pull request to cPython. I hope I'm not missing anything?
📚 Documentation preview 📚:https://cpython-previews--106624.org.readthedocs.build/