Skip to content

Conversation

@panva
Copy link
Member

Both HKDF and PBKDF2 do not specify a default-applied length, this removes a possibly forgotten default used for initial development?

If length is null or zero, or is not a multiple of 8, then throw an OperationError.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/crypto

@nodejs-github-botnodejs-github-bot added crypto Issues and PRs related to the crypto subsystem. needs-ci PRs that need a full CI run. labels Oct 10, 2022
@panvapanva added experimental Issues and PRs related to experimental features. webcrypto and removed needs-ci PRs that need a full CI run. labels Oct 10, 2022
@panvapanva requested a review from jasnellOctober 10, 2022 08:20
@panvapanva added needs-ci PRs that need a full CI run. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 10, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 10, 2022
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@panvapanva added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Oct 10, 2022
@panvapanvaforce-pushed the fix-webcrypto-remove-pbkdf2-default branch from a761f04 to 924d59dCompareOctober 12, 2022 13:48
@panvapanvaforce-pushed the fix-webcrypto-remove-pbkdf2-default branch from 924d59d to 7f61102CompareOctober 12, 2022 13:54
@panvapanva added the request-ci Add this label to start a Jenkins CI on a PR. label Oct 12, 2022
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 12, 2022
@nodejs-github-bot
Copy link
Collaborator

Copy link
Contributor

@aduh95aduh95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with or without my suggestion

Comment on lines +129 to +131
letresult;
try{
result=awaitpbkdf2Promise(raw,salt,iterations,length/8,hash);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
letresult;
try{
result=awaitpbkdf2Promise(raw,salt,iterations,length/8,hash);
try{
const{ buffer }=awaitpbkdf2Promise(raw,salt,iterations,length/8,hash);
returnbuffer;

resolve(result.buffer);
});
});
returnresult.buffer;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return result.buffer;

@panvapanva added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 12, 2022
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 12, 2022
@nodejs-github-botnodejs-github-bot merged commit 40a0757 into nodejs:mainOct 12, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in 40a0757

@panvapanva deleted the fix-webcrypto-remove-pbkdf2-default branch October 13, 2022 09:12
danielleadams pushed a commit that referenced this pull request Dec 30, 2022
PR-URL: #44945 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
danielleadams pushed a commit that referenced this pull request Jan 3, 2023
PR-URL: #44945 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.cryptoIssues and PRs related to the crypto subsystem.experimentalIssues and PRs related to experimental features.needs-ciPRs that need a full CI run.webcrypto

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@panva@nodejs-github-bot@jasnell@aduh95@RafaelGSS