New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

isomorphic-crypto

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

isomorphic-crypto

Isomorphic crypto package for node and the browser.

  • 3.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2K
decreased by-40.47%
Maintainers
1
Weekly downloads
 
Created
Source

isomorphic-crypto NPM Version

Isomorphic crypto package for node and the browser. Uses the native crypto module when run in node and crypto-browserify when run in the browser. Use it for hashing, signing and your other crypto needs!

Installation

npm install --save isomorphic-crypto

# using yarn:

yarn add isomorphic-crypto

Usage

Have a look at the official crypto documentation.

Please be aware that the browser version of this library uses crypto-browserify, which is only a partial implementation of node's native crypto module. Check out their documentation to see what is supported and what not.

Example

const crypto = require('isomorphic-crypto')

function sha512 (string) {
  const hash = crypto.createHash('sha512')
  hash.write(string)
  return hash.digest('hex')
}

console.log(`sha512('crypto rocks') = ${sha512('crypto rocks')}`)

Versioning

The library's major version matches the major version of the crypto-browserify package. The minor and patch version can be bumped independently.

License

MIT

Keywords

FAQs

Package last updated on 22 Aug 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc