Skip to content

Support algo options#217

Closed
EyePulp wants to merge 6 commits into
marc136:mainfrom
mirusresearch:support-algo-options
Closed

Support algo options#217
EyePulp wants to merge 6 commits into
marc136:mainfrom
mirusresearch:support-algo-options

Conversation

@EyePulp

@EyePulp EyePulp commented Oct 26, 2023

Copy link
Copy Markdown
Contributor

Howdy;
I needed to adjust an algo via extra options, so I added support via an algoOptions object to pass through for the second argument -- crypto.createHash(algorithm[, options])

Added a test and updated readme docs, bumped the package.json version.

Let me know if I can improve anything!

Thanks for a cool package.

@EyePulp

EyePulp commented Oct 26, 2023

Copy link
Copy Markdown
Contributor Author

Looks like Node 10 allows the options to be passed (for shake256 for example) but ignores them. I added explicit CI tests for node12, and 14, which all seem to pass. The support for algorithm args wasn't added to createHash until node v12.8

I added a fix for the versions < v12.8

marc136 added a commit that referenced this pull request Jan 2, 2025
marc136 added a commit that referenced this pull request Jan 2, 2025
@marc136

marc136 commented Jan 2, 2025

Copy link
Copy Markdown
Owner

Sorry for not getting back to you @EyePulp, I just now added the option you proposed two years ago with #233.

It will be part of the upcoming 4.1 and also of the 5.0 version I'm working on.

@marc136 marc136 closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants