Skip to content

Instantly share code, notes, and snippets.

@kkaefer
Created May 10, 2011 02:59
Show Gist options
  • Save kkaefer/963837 to your computer and use it in GitHub Desktop.
Save kkaefer/963837 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var Buffer = require('buffer').Buffer;
Buffer.prototype.randomize = function() {
var fd = fs.openSync('/dev/random', 'r');
fs.readSync(fd, this, 0, this.length, 0);
fs.closeSync(fd);
return this;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment