Created
May 10, 2011 02:59
-
-
Save kkaefer/963837 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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