@aws-crypto/sha256-browser
SHA256 wrapper for browsers that prefers `window.crypto.subtle` but will fall back to a pure JS implementation in @aws-crypto/sha256-js to provide a consistent interface for SHA256.
Last updated a year ago by aws-crypto-tools-ci-bot .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @aws-crypto/sha256-browser 
SYNC missed versions from official npm registry.

@aws-crypto/sha256-browser

SHA256 wrapper for browsers that prefers window.crypto.subtle but will fall back to a pure JS implementation in @aws-crypto/sha256-js to provide a consistent interface for SHA256.

Usage

  • To hash "some data"
import {Sha256} from '@aws-crypto/sha256-browser'

const hash = new Sha256();
hash.update('some data');
const result = await hash.digest();

  • To hmac "some data" with "a key"
import {Sha256} from '@aws-crypto/sha256-browser'

const hash = new Sha256('a key');
hash.update('some data');
const result = await hash.digest();

Test

npm test

Current Tags

  • 5.2.0                                ...           latest (a year ago)

20 Versions

  • 5.2.0                                ...           a year ago
  • 5.1.0                                ...           a year ago
  • 5.0.0                                ...           a year ago
  • 4.0.0                                ...           2 years ago
  • 3.0.0                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 2.0.1                                ...           3 years ago
  • 2.0.0                                ...           3 years ago
  • 1.2.2                                ...           3 years ago
  • 1.2.1                                ...           3 years ago
  • 1.2.0                                ...           3 years ago
  • 1.1.1                                ...           3 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
  • 1.0.0-alpha.0                                ...           5 years ago
  • 0.1.0-preview.4                                ...           5 years ago
  • 0.1.0-preview.3                                ...           5 years ago
  • 0.1.0-preview.2                                ...           5 years ago
  • 0.1.0-preview.1                                ...           6 years ago
  • 0.1.0 [deprecated]           ...           6 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE