feat(browser): Implement fallback SHA256 for non-HTTPS environments and enhance browser tests for consistent hashing
This commit is contained in:
@ -37,4 +37,9 @@ Merge the functionality from @push.rocks/isohash into @push.rocks/smarthash to p
|
||||
- The web version uses native Web Crypto API for performance
|
||||
- The Node.js version continues using the existing crypto implementation
|
||||
- API remains consistent across both environments
|
||||
- No breaking changes to existing smarthash functionality
|
||||
- No breaking changes to existing smarthash functionality
|
||||
|
||||
## Additional Features Implemented
|
||||
- **Fallback for non-HTTPS environments**: Added pure JavaScript SHA256 implementation that automatically activates when crypto.subtle is not available (e.g., HTTP or file:// protocols)
|
||||
- **Comprehensive browser tests**: Created test.browser.ts with specific browser environment tests
|
||||
- **Cross-environment consistency**: Ensured hash outputs match across Node.js and browser implementations
|
Reference in New Issue
Block a user