-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Closed
Labels
cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.
Description
Reuse is a fundamental issue...
const crypto = require('crypto')
const H = crypto.createHash('md5') // NEED REUSE THIS INITIALIZATION
console.log( H.update('some data to hash').digest('hex') ) // first ok...
console.log( H.update('some2').digest('hex') ) // ugly "Error: Digest already called"!
The problem that I am trying to solve: to reuse initialization.
The desired behavior: no error.
... No alternative solutions, but please, show me if there are some elegant one.
Metadata
Metadata
Assignees
Labels
cryptoIssues and PRs related to the crypto subsystem.Issues and PRs related to the crypto subsystem.duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.