Merge pull request #2068 from webzwo0i/fix-randomstring

fix randomstring
This commit is contained in:
Marcel Klehr 2014-01-24 07:43:19 -08:00
commit 4b87f77aae

View file

@ -3,11 +3,9 @@
*/
var crypto = require('crypto');
var randomString = function randomString(len)
var randomString = function(len)
{
crypto.randomBytes(len, function(ex, buf) {
return buf.toString('hex');
});
return crypto.randomBytes(len).toString('hex')
};
module.exports = randomString;