question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

review `std/crypto` and `std/hash`

See original GitHub issue

Continuing 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:

  1. Move stream-based functionality within std/hash to std/crypto/streams.
  2. Deprecate APIs within std/hash that exist within std/crypto.
  3. Move some Hasher methods such as toString as pure functions in std/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:closed
  • Created a year ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
cjihrigcommented, Oct 3, 2022

If we can make std/hash completely redundant, I’d be supportive of moving things into std/crypto. If we can’t make it redundant, maybe we should just wait on streaming webcrypto.

0reactions
iuioiuacommented, Oct 17, 2022

@kt3k, I’ll go ahead and remove std/hash if and once the above PRs are merged, seeing as it’s been deprecated for a while now.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found