noisegendeprecated

create a readable stream of random bytes

Usage no npm install needed!

<script type="module">
  import noisegen from 'https://cdn.skypack.dev/noisegen';
</script>

README

NoiseGen

Build Status NPM

Create a readable stream of random bytes.

Usage (Module)

npm install noisegen --save
var noisegen = require('noisegen');

var randomio = noisegen({
  length: 4096,  // defaults to Infinity
  size: 32,      // defaults to 512
  hash: 'rmd160' // defaults to sha256
});

randomio.on('data', function(bytes) {
  console.log('random bytes:', bytes);
});

randomio.on('end', function() {
  console.log('resulting hash:', this.hash.toString('hex'));
});

Usage (CLI)

npm install -g noisegen
> $ noisegen --help

  Usage: noisegen [options]

  Options:

    -h, --help            output usage information
    -V, --version         output the version number
    -l, --length <bytes>  Bytes to generate (default: Infinity)
    -s, --size <bytes>    Bytes in each random chunk (default: 512)

License

NoiseGen - Create a readable stream of random bytes
Copyright (C) 2016 Gordon Hall

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/.