Allow Hash object reuse
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
What is the problem this feature will solve?
https://github.com/nodejs/node/issues/25857#issuecomment-466384613
I'm creating the hash of many small objects and need to keep track of these individual hashes so https://github.com/nodejs/node/issues/29903 doesn't work.
My specific use case is that I'm hashing directory layouts to setup a file layout that's optimal about symlinking entire directories when its filled with symlinked entries that all point to the same source directory. I can get into specifics if that matters.
What is the feature you are proposing to solve the problem?
crypto.Hash.reset() - reset the internal state of the hasher and allows it to be reused with any new allocations
What alternatives have you considered?
-not use crypto.hash in this case and write my own hasher
-create a native add on that lets me manage to hash context according to my needs
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are identified in the issue. Start by reading the two linked Node.js discussions and the existing crypto.Hash API context; done means a reset operation lets one Hash object be reused for new allocations while preserving separate hash results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- api, cryptography
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100