Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-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

async-sha256

async sha256 function, using native crypto

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

async sha256 function, using native crypto

This package contains a async sha256 function using the native crypto API. Calling this function with an 'await' requires the code to be within a async block, see the below examples.

Note:

This requires a modern browser that supports native crypto.

Installation

npm install --save async-sha256

Usage

import sha256 from 'async-sha256';

sha256('matt').then(function(hash) {
console.log(hash);//eslint-disable-line
});
Or:
import sha256 from 'async-sha256';

async function doSomething() {
  const hash = await sha256('matt');
  console.log(hash);//eslint-disable-line
}
doSomething();

Change log

1.0.3

  • Pushed: updated read me to include instructions noting that this currently only works in modern browsers and not node.

1.0.2

  • Pushed: modified exports to work correctly.

1.0.1

  • Pushed: changed code examples.

1.0.0

  • Pushed: relocated file, fixed bug, this can be 1.0.

0.9.0

  • Pushed: first version

Keywords

FAQs

Package last updated on 24 May 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