Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
There is a similar case in the documentation for scrypt() few lines below. Please add "in bytes" there too.
Sorry, something went wrong.
|
Updated dklen documentation for scrypt() to include 'in bytes' |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
Sorry, something went wrong.
|
Thanks @thiezn for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, something went wrong.
|
GH-119383 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
GH-119384 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
Update hashlib.pbkdf2_hmac docs that dklen is in bytes
The hashlib.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 other language 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/