Merge pull request #2068 from webzwo0i/fix-randomstring

fix randomstring
fix-timeslider
Marcel Klehr 2014-01-24 07:43:19 -08:00
commit 4b87f77aae
1 changed files with 2 additions and 4 deletions

View File

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