
Security News
RubyGems Adds Cooldown Feature to Bundler for Newly Published Gems
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.
@se-oss/sha256
Advanced tools
Lightweight JavaScript utilities for SHA-256 and HMAC-SHA-256 hashing, compatible with any JS runtime.
@se-oss/sha256 is a JavaScript library that provides utilities for SHA-256 and HMAC-SHA-256 hashing. This library is designed to work seamlessly in any JavaScript runtime, offering efficient and straightforward functions for cryptographic hashing.
npm i @se-oss/sha256
pnpm
pnpm install @se-oss/sha256
yarn
yarn add @se-oss/sha256
import { sha256 } from '@se-oss/sha256';
// Hashing a string
const hash = sha256('Hello, world!');
// Hashing a Uint8Array
const data = new Uint8Array([1, 2, 3, 4, 5]);
const hash2 = sha256(data);
import { hmacSha256 } from '@se-oss/sha256';
const key = 'my-secret-key';
const message = 'Hello, HMAC!';
const hmac = hmacSha256(key, message);
import { createSha256 } from '@se-oss/sha256';
const hasher = createSha256();
hasher.update('Hello, ');
hasher.update('world!');
const hexHash = hasher.digest('hex');
import { timeSafeCompare } from '@se-oss/sha256';
const result = timeSafeCompare('hello', 'hello'); // true
For detailed API documentation on all methods, please see the API docs.
Want to contribute? Awesome! To show your support is to star the project, or to raise issues on GitHub.
Thanks again for your support, it is much appreciated! 🙏
MIT © Shahrad Elahi and contributors.
FAQs
Lightweight JavaScript utilities for SHA-256 and HMAC-SHA-256 hashing, compatible with any JS runtime.
We found that @se-oss/sha256 demonstrated a healthy version release cadence and project activity because the last version was released less than 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
RubyGems and Bundler 4.0.13 introduced an opt-in cooldown feature that delays newly published gems during dependency resolution.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.