npm.io
5.2.0 • Published 3 years ago

@aws-crypto/sha1-browser

Licence
Apache-2.0
Version
5.2.0
Deps
6
Size
37 kB
Vulns
0
Weekly
0
Stars
69

@aws-crypto/sha1-browser

SHA1 wrapper for browsers that prefers window.crypto.subtle.

SHA1 is NOT a cryptographically secure algorithm. It should only be used for non cryptographic functions like checksums.

Usage

import {Sha1} from '@aws-crypto/sha1-browser'

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

Test

npm test