Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Quickly create and verify hashed message authentication codes
$ export HMAC_SECRET=MY_SECRET_KEY
$ npx hmac-cli generate 'Message to Hash'
36a2f1cb3e77384f5d98dac34e501d9367570408d2b5fb7519808c34443dc3a6
$ node verify 'Message to Hash' -e 36a2f1cb3e77384f5d98dac34e501d9367570408d2b5fb7519808c34443dc3a6
Success: Given HMAC string matches the generated!
$ npm i -g hmac-cli
then use the global hmac
command:
hmac generate 'Message to Hash' -s MY_SECRET_KEY
Get help:
$ npx hmac-cli --help
Usage: hmac [options] [command]
Options:
-h, --help display help for command
Commands:
generate [options] <content>
verify [options] <content>
help [command] display help for command
or help for specific command:
$ npx hmac-cli help generate
Usage: hmac generate [options] <content>
Options:
-h, --hash <name> Name of the hash function (default: "sha256")
-d, --digest <alhorithm> Digest algorithm (default: "hex")
-s, --secret <secret> HMAC secret string
--help display help for command
Example usage with options:
$ npx hmac-cli generate 'Message to Hash' -h sha512 -d base64 -s YOUR_SECRET
MIT
FAQs
Command line utilities to generate or verify HMAC
The npm package hmac-cli receives a total of 0 weekly downloads. As such, hmac-cli popularity was classified as not popular.
We found that hmac-cli demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.