review `std/crypto` and `std/hash`
See original GitHub issueContinuing the discussion from #2719, std/hash shouldn’t be fully deprecated due to its desired streaming functionality that isn’t yet available as a web spec. Although, it’s planned to one day be.
However, std/hash does overlap with std/crypto in a few ways. I have a few suggestions that I think would prune some of this overlapped functionality:
- Move stream-based functionality within
std/hashtostd/crypto/streams. - Deprecate APIs within
std/hashthat exist withinstd/crypto. - Move some
Hashermethods such astoStringas pure functions instd/crypto.
Put simply; I suggest we merge std/hash into std/crypto. Doing so would get rid of duplicate code and maintain streaming support. @kt3k and @cjihrig, what do you guys think?
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Review the std/hash Hasher interface · Issue #652 - GitHub
The Hasher interface defined in std/hash might warrant a review. First thing I noticed was that Hasher.digest returns an ArrayBuffer, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

If we can make
std/hashcompletely redundant, I’d be supportive of moving things intostd/crypto. If we can’t make it redundant, maybe we should just wait on streaming webcrypto.@kt3k, I’ll go ahead and remove
std/hashif and once the above PRs are merged, seeing as it’s been deprecated for a while now.