// Original code adapted from Robert Kieffer.
// details at https://github.com/broofa/node-uuid
(function() {
  var _global = this;

  var mathRNG, whatwgRNG;

  // NOTE: Math.random() does not guarantee "cryptographic quality"
  mathRNG = function(size) {
    var bytes = new Array(size);
    var r;

    for (var i = 0, r; i < size; i++) {
      if ((i & 0x03) == 0) r = Math.random() * 0x100000000;
      bytes[i] = r >>> ((i & 0x03) << 3) & 0xff;
    }

    return bytes;
  }

  if (_global.crypto && crypto.getRandomValues) {
    var _rnds = new Uint32Array(4);
    whatwgRNG = function(size) {
      var bytes = new Array(size);
      crypto.getRandomValues(_rnds);

      for (var c = 0 ; c < size; c++) {
        bytes[c] = _rnds[c >> 2] >>> ((c & 0x03) * 8) & 0xff;
      }
      return bytes;
    }
  }

  module.exports = whatwgRNG || mathRNG;

}())

@@ -528,44 +528,8 @@
 ) %7B%0A
-    var _rnds = new Uint32Array(4);%0A
     
@@ -571,32 +571,37 @@
 var bytes = new 
+Uint8
 Array(size);%0A   
@@ -630,126 +630,15 @@
 ues(
-_rnds);%0A%0A      for (var c = 0 ; c %3C size; c++) %7B%0A        bytes%5Bc%5D = _rnds%5Bc %3E%3E 2%5D %3E%3E%3E ((c & 0x03) * 8) & 0xff;%0A      %7D
+bytes);
 %0A   

Fix random generator for more than 16 bytes #28