Skip to content

feat: add SHA-3 and cSHAKE support to subtle.digest()#942

Merged
boorad merged 1 commit into
mainfrom
feat/sha3-cshake-digest
Feb 17, 2026
Merged

feat: add SHA-3 and cSHAKE support to subtle.digest()#942
boorad merged 1 commit into
mainfrom
feat/sha3-cshake-digest

Conversation

@boorad
Copy link
Copy Markdown
Collaborator

@boorad boorad commented Feb 17, 2026

Summary

Adds SHA-3 family and cSHAKE (SHAKE XOF) support to subtle.digest(), completing digest algorithm compatibility with Node.js.

Changes

  • Add SHA3-256, SHA3-384, SHA3-512 to subtle.digest()
  • Add cSHAKE128 / cSHAKE256 providing SHAKE128/SHAKE256 (XOF) with empty customization, matching Node.js behavior
  • Validate cSHAKE length parameter (required, positive, must be a multiple of 8)
  • Fix normalizeHashName return type (string instead of unsound HashAlgorithm cast)
  • Widen SubtleAlgorithm.hash to accept string for compatibility with normalizeHashName
  • Add hash name mappings for SHA-3 and SHAKE families in hashnames.ts
  • Add unit tests for SHA-3/SHAKE/cSHAKE hash name normalization
  • Add E2E tests for all new digest algorithms
  • Update implementation coverage docs
  • Add "never commit to main" rule to CLAUDE.md and orchestrator agent

Testing

  • bun tsc passes for both packages
  • bun test packages/react-native-quick-crypto/test/hashnames.test.ts — 6/6 pass
  • E2E digest tests validate output against createHash() reference values

Closes #936

- 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
@boorad boorad self-assigned this Feb 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

🤖 End-to-End Test Results - iOS

Status: ✅ Passed
Platform: iOS
Run: 22083063421

📸 Final Test Screenshot

Maestro Test Results - ios

Screenshot automatically captured from End-to-End tests and will expire in 30 days


This comment is automatically updated on each test run.

@github-actions
Copy link
Copy Markdown
Contributor

🤖 End-to-End Test Results - Android

Status: ✅ Passed
Platform: Android
Run: 22083063423

📸 Final Test Screenshot

Maestro Test Results - android

Screenshot automatically captured from End-to-End tests and will expire in 30 days


This comment is automatically updated on each test run.

@boorad boorad merged commit 34e61cd into main Feb 17, 2026
6 checks passed
@boorad boorad deleted the feat/sha3-cshake-digest branch February 17, 2026 02:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ add cSHAKE and SHA-3 implementations

1 participant