Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@aws-crypto/random-source-browser

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

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 and IE11.

  • 0.1.0-preview.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
547
decreased by-66.59%
Maintainers
4
Weekly downloads
 
Created
Source

@aws-crypto/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 and IE11.

Usage

import {randomValues, randomValuesOnly} from '@aws-crypto/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

Package last updated on 16 Jan 2020

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc