code: function bnGetPrng() {
    // create prng with api that matches BigInteger secure random
    return {
      // x is an array to fill with bytes
      nextBytes: function(x) {
        for(var i = 0; i < x.length; ++i) {
          x[i] = Math.floor(Math.random() * 0xFF);
        }
      }
    };
  }
docs: get pseudo random number generator