GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Added documentation describing the dklen is expected in bytes for the… by thiezn · Pull Request #106624 · python/cpython

Conversation

@thiezn

@thiezn thiezn commented Jul 11, 2023 •
edited by github-actions Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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/

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@m-mortimer
Added documentation describing the dklen is expected in bytes for the…
aa95a29
… hashlib.pbkdf2_hmac function.
@thiezn
thiezn requested a review from tiran as a code owner July 11, 2023 13:08
@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Jul 11, 2023
@ghost

ghost commented Jul 11, 2023 •
edited by ghost
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.
CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thiezn
Merge branch 'main' into main
3d1a038
serhiy-storchaka
serhiy-storchaka reviewed Feb 1, 2024
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

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 for scrypt() few lines below. Please add "in bytes" there too.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@m-mortimer
Updated scrypt dklen parameter description to specify it is in bytes
76f6d6b
@thiezn
thiezn requested a review from gpshead as a code owner May 22, 2024 07:12
@thiezn

thiezn commented May 22, 2024

Copy link
Copy Markdown
Contributor Author

Updated dklen documentation for scrypt() to include 'in bytes'

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@thiezn
Merge branch 'main' into main
c894322
@thiezn
thiezn requested a review from serhiy-storchaka May 22, 2024 07:42
serhiy-storchaka
serhiy-storchaka approved these changes May 22, 2024
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

thiezn reacted with hooray emoji
All reactions
  • 🎉 1 reaction
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting review labels May 22, 2024
@serhiy-storchaka serhiy-storchaka added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes skip issue labels May 22, 2024
@serhiy-storchaka
serhiy-storchaka merged commit 5adf78f into python:main May 22, 2024
@miss-islington-app

miss-islington-app Bot commented May 22, 2024

Copy link
Copy Markdown

Thanks @thiezn for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label May 22, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 22, 2024
@thiezn @miss-islington
Clarify that dklen is expected in bytes for the hashlib functions (py…
692bac3
…thonGH-106624)

(cherry picked from commit 5adf78f)

Co-authored-by: Mathijs Mortimer <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 22, 2024
@thiezn @miss-islington
Clarify that dklen is expected in bytes for the hashlib functions (py…
0f49471
…thonGH-106624)

(cherry picked from commit 5adf78f)

Co-authored-by: Mathijs Mortimer <[email protected]>
@bedevere-app

bedevere-app Bot commented May 22, 2024

Copy link
Copy Markdown

GH-119383 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label May 22, 2024
@bedevere-app

bedevere-app Bot commented May 22, 2024

Copy link
Copy Markdown

GH-119384 is a backport of this pull request to the 3.12 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label May 22, 2024
serhiy-storchaka pushed a commit that referenced this pull request May 22, 2024
@miss-islington @thiezn
[3.12] Clarify that dklen is expected in bytes for the hashlib functi…
9bd9879
…ons (GH-106624) (GH-119384)

(cherry picked from commit 5adf78f)

Co-authored-by: Mathijs Mortimer <[email protected]>
serhiy-storchaka pushed a commit that referenced this pull request May 22, 2024
@miss-islington @thiezn
[3.13] Clarify that dklen is expected in bytes for the hashlib functi…
f757996
…ons (GH-106624) (GH-119383)

(cherry picked from commit 5adf78f)

Co-authored-by: Mathijs Mortimer <[email protected]>
@JelleZijlstra JelleZijlstra mentioned this pull request May 28, 2024
backport a9a74da 3.13 #119642
Closed
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
@thiezn @estyxx
Clarify that dklen is expected in bytes for the hashlib functions (py…
5b16a02
…thonGH-106624)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes
@tiran tiran Awaiting requested review from tiran
@gpshead gpshead Awaiting requested review from gpshead gpshead is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@thiezn @serhiy-storchaka @bedevere-bot @m-mortimer
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.