@aws-crypto/random-source-browser
Advanced tools
Weekly downloads
Changelog
Readme
Access to a secure random source in a browser.
Math.random
is not acceptable for cryptographic operations.
This module exports a consistent interface for modern browsers
and IE11.
import {randomValues, randomValuesOnly} from '@aws-crypto/random-source-browser'
const seedData2 = await randomValues(16);
const seedData1 = await randomValuesOnly(16);
Some browsers only implement crypto.getRandomValues
and not crypto.subtle
.
If you need to have access to both, you should use randomValues
. But if
you want to use some cryptographic fallback like MSRCrypto randomValuesOnly
is the preferred function.
npm test
FAQs
Access to a secure random source in a browser. `Math.random` is not acceptable for cryptographic operations. This module exports a consistent interface for modern browsers and IE11.
The npm package @aws-crypto/random-source-browser receives a total of 1,064 weekly downloads. As such, @aws-crypto/random-source-browser popularity was classified as popular.
We found that @aws-crypto/random-source-browser demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.