-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PBKDF2 allows zero length and returns and empty string
This CL adapts our implementation to the spec change described in the PR#380 [1]. Instead of trowing an OperationError exception, we allow now zero as value for the 'length' parameter. Given that the deriveBits operation must result in an empty string, this change early returns to avoid the unnecessary computation of the bits derivation. The specific WTP defined for this case are modified in this CL as well, so no additional test cases are needed. [1] w3c/webcrypto#380 Bug: 376493194 Change-Id: If685c349a0a9d134a8e8f7c902e8aac342945226
- Loading branch information
1 parent
1b37e8e
commit 7669912
Showing
2 changed files
with
2 additions
and
12 deletions.
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