src/crypto_browser.js
function(length) {
      var array, byte, _i, _len, _results;
      array = new Uint8Array(length);
      window.crypto.getRandomValues(array);
      _results = [];
      for (_i = 0, _len = array.length; _i < _len; _i++) {
        byte = array[_i];
        _results.push(byte);
      }
      return _results;
    }
function(length) {
      var array, byte, _i, _len, _results;
      array = new Uint8Array(length);
      window.crypto.getRandomValues(array);
      _results = [];
      for (_i = 0, _len = array.length; _i < _len; _i++) {
        byte = array[_i];
        _results.push(byte);
      }
      return _results;
    }
function ( length ) { var array , byte , _i , _len , _results ; array = new Uint8Array ( length ) ; window . crypto . getRandomValues ( array ) ; _results = [ ] ; for ( _i = 0 , _len = array . length ; _i < _len ; _i ++ ) { byte = array [ _i ] ; _results . push ( byte ) ; } return _results ; }
Generates cryptographically strong pseudo-random data.
@param {Numbers} length How many bytes of data you want.
@return {Buffer} The random data as a Buffer.
Generates cryptographically strong pseudo - random data .