fix randomstring

pull/2068/head
webzwo0i 2014-01-24 01:19:14 +01:00
parent e4fbf4bbcd
commit a43123880a
1 changed files with 2 additions and 4 deletions

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;