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

secure-random

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

secure-random

Normalize the creation of cryptographically strong random values.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
105K
increased by6.79%
Maintainers
1
Weekly downloads
 
Created
Source

secure-random

A simple JavaScript component to normalize the creation of cryptographically strong random values.

Why?

Context switching between the browser and Node.js and creating cryptographically secure random numbers is annoying. This normalizes the behavior. Used by cryptocoinjs

Install

Node.js/Browserify

npm install --save secure-random

Component

component install jprichardson/secure-random

Bower

bower install secure-random

Script

<script src="/path/to/secure-random.js"></script>

Usage

secureRandom(count, options)

count: is the number of elements to return. options: options to pass. Only valid value is array.

Returns a Uint8Array or Array if options.array is set.

var bytes = secureRandom(10)
console.log(bytes.length) //10

References

License

(MIT License)

Copyright 2013, JP Richardson

Keywords

FAQs

Package last updated on 08 Dec 2013

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