Socket
Socket
Sign inDemoInstall

@aws-crypto/random-source-browser

Package Overview
Dependencies
3
Maintainers
8
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @aws-crypto/random-source-browser

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.


Version published
Weekly downloads
1.8K
increased by6.89%
Maintainers
8
Created
Weekly downloads
 

Changelog

Source

5.0.0 (2023-07-13)

  • feat!: drop support for IE 11 (#629) (6c49fb6), closes #629
  • chore!: Drop Node 14 Support (#678) (4bae6e9), closes #678

BREAKING CHANGES

  • Remove support for IE11

Co-authored-by: texastony 5892063+texastony@users.noreply.github.com

  • Node 14 is no longer supported nor tested.

Readme

Source

@aws-crypto/random-source-browser

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.

Usage

import {randomValues, randomValuesOnly} from '@aws-crypto/random-source-browser'

const seedData2 = await randomValues(16);
const seedData1 = await randomValuesOnly(16);

randomValues vs randomValuesOnly

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.

Test

npm test

FAQs

Last updated on 13 Jul 2023

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc