🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

random-bytes-readable-stream

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-bytes-readable-stream

Creates a readable stream producing cryptographically strong pseudo-random data using `crypto.randomBytes()`

3.0.0
latest
Source
npm
Version published
Weekly downloads
4.6K
-32.12%
Maintainers
1
Weekly downloads
 
Created
Source

random-bytes-readable-stream

Creates a readable stream producing cryptographically strong pseudo-random data using crypto.randomBytes()

It's like a cross-platform fs.createReadStream('/dev/urandom').

Install

$ npm install random-bytes-readable-stream

Usage

import randomBytesReadableStream from 'random-bytes-readable-stream';

randomBytesReadableStream({size: 10}).pipe(process.stdout);

API

randomBytesReadableStream(options?)

Returns a stream.Readable.

By default, it produces infinite data.

options

Type: Object

size

Type: number
Default: Infinity

The total size to be produced by the stream in bytes.

Keywords

random

FAQs

Package last updated on 12 Aug 2021

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