-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ext/crypto): implement importKey and deriveBits for Pbkdf2 #11642
Merged
Merged
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
a354791
feat(extensions/crypto): implement importKey and deriveBits for Pbkdf2
littledivy 5606002
fmt
littledivy 1c622cc
lint
littledivy 3b8e93f
mismatched signatures in supportedAlgorithms
littledivy 9ac0bbd
pass WPT
littledivy 14a2bd6
WPT fpr deriveBits
littledivy 34bafc0
update expectations
littledivy 3524fb7
re run ci
littledivy cdceb15
re run CI
littledivy c7697e4
Merge branch 'main' of https://github.com/denoland/deno into pbkdf2
littledivy eb63554
re run (again)
littledivy 2da3033
run CI again
littledivy 784056f
Merge branch 'main' of https://github.com/denoland/deno into pbkdf2
littledivy e1f57ba
update expectations
littledivy 7f3deb9
fix
littledivy 2f89fdc
fixes
littledivy 45eb0b5
fmt
littledivy 4619d6b
Merge branch 'main' into pbkdf2
littledivy 3a8e233
update expectations
littledivy 1a48700
Merge branch 'main' into pbkdf2
littledivy 3697a55
add deriveBits step 7 and 8
littledivy abca40a
assert!
littledivy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -114,4 +114,6 @@ pub enum Algorithm { | |
AesKw, | ||
#[serde(rename = "HMAC")] | ||
Hmac, | ||
#[serde(rename = "PBKDF2")] | ||
Pbkdf2, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Can you check if there's e.g. a WPT test that tests non-numeric inputs?
The logic is correct because e.g.
"bad" % 8
evaluates toNaN
andNaN !== 0
but I suspect that if it somehow managed to slip through to Rust land, it'd get coerced to zero.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.
@bnoordhuis All the input types are always valid. They are validated by various webidl converters at the top of this function.
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.
Only
null
as non-numeric length is tested in WPT.Wouldn't the WebIDL converter (
unsigned long
) also complain? Edit: Whoops Github doesn't update in realtimeThere 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.
Yes, it will. Strings will already fail parsing there, so will never reach this statement.