feat: add SHA-3 and cSHAKE support to subtle.digest()#942
Merged
Conversation
- Add SHA3-256, SHA3-384, SHA3-512 to subtle.digest() - Add cSHAKE128/cSHAKE256 (SHAKE XOF with empty customization) - Validate cSHAKE length parameter (required, must be multiple of 8) - Fix normalizeHashName return type (string instead of unsound HashAlgorithm) - Add hash name mappings for SHA-3 and SHAKE families - Update implementation coverage docs - Add 'never commit to main' rule to CLAUDE.md and orchestrator
Contributor
🤖 End-to-End Test Results - iOSStatus: ✅ Passed 📸 Final Test ScreenshotScreenshot automatically captured from End-to-End tests and will expire in 30 days This comment is automatically updated on each test run. |
Contributor
🤖 End-to-End Test Results - AndroidStatus: ✅ Passed 📸 Final Test ScreenshotScreenshot automatically captured from End-to-End tests and will expire in 30 days This comment is automatically updated on each test run. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


Summary
Adds SHA-3 family and cSHAKE (SHAKE XOF) support to
subtle.digest(), completing digest algorithm compatibility with Node.js.Changes
subtle.digest()lengthparameter (required, positive, must be a multiple of 8)normalizeHashNamereturn type (stringinstead of unsoundHashAlgorithmcast)SubtleAlgorithm.hashto acceptstringfor compatibility withnormalizeHashNamehashnames.tsTesting
bun tscpasses for both packagesbun test packages/react-native-quick-crypto/test/hashnames.test.ts— 6/6 passcreateHash()reference valuesCloses #936