Creates a readable stream producing cryptographically strong pseudo-random data using
crypto.randomBytes()
It's like a cross-platform fs.createReadStream('/dev/urandom')
.
$ npm install random-bytes-readable-stream
import randomBytesReadableStream from 'random-bytes-readable-stream';
randomBytesReadableStream({size: 10}).pipe(process.stdout);
Returns a stream.Readable
.
By default, it produces infinite data.
Type: Object
Type: number
Default: Infinity
The total size to be produced by the stream in bytes.