You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cross-sha256

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cross-sha256

SHA-256 hash in pure javascript

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
36K
-18.26%
Maintainers
1
Weekly downloads
 
Created
Source

cross-sha256

NPM Package Build Status

Isomorphic SHA-256 with minimal dependencies. Uses the Node.js crypto module if available, otherwise uses a JS implementation (e.g. in browser environments).

import { sha256 } from 'cross-sha256'

console.log(new sha256().update('42').digest('hex'))
// => 73475cb40a568e8da8a045ced110137e159f890ac4da883b6b17dc651b3a8049

Acknowledgements

This work is derived from Paul Johnston's A JavaScript implementation of the Secure Hash Algorithm.

LICENSE MIT

FAQs

Package last updated on 01 Nov 2021

Did you know?

Socket

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.

Install

Related posts