
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
simple-sha256
Advanced tools
In Node.js, this package uses crypto.createHash()
. In the browser, it uses crypto.subtle.digest()
.
npm install simple-sha256
Async (returns a Promise
):
const sha256 = require('simple-sha256')
init()
async function init () {
const hash = await sha256('hey there')
console.log(hash)
// 74ef874a9fa69a86e091ea6dc2668047d7e102d518bebed19f8a3958f664e3da
}
Sync:
const sha256 = require('simple-sha256')
console.log(sha256.sync('hey there'))
// 74ef874a9fa69a86e091ea6dc2668047d7e102d518bebed19f8a3958f664e3da
MIT. Copyright (c) Feross Aboukhadijeh.
FAQs
Generate SHA-256 hashes (in Node and the Browser)
The npm package simple-sha256 receives a total of 14,286 weekly downloads. As such, simple-sha256 popularity was classified as popular.
We found that simple-sha256 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.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.