UNPKG

393 BMarkdownView Raw
1# @aws-crypto/sha256-browser
2
3SHA256 wrapper for browsers that prefers `window.crypto.subtle` but will
4fall back to a pure JS implementation in @aws-crypto/sha256-js
5to provide a consistent interface for SHA256.
6
7## Usage
8
9```
10import {Sha256} from '@aws-crypto/sha256-browser'
11
12const hash = new Sha256();
13hash.update('some data');
14const result = await hash.digest();
15
16```
17
18## Test
19
20`npm test`