From a43123880a16d7186f3183b409ff22b62706dcc6 Mon Sep 17 00:00:00 2001 From: webzwo0i Date: Fri, 24 Jan 2014 01:19:14 +0100 Subject: [PATCH] fix randomstring --- src/node/utils/randomstring.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/node/utils/randomstring.js b/src/node/utils/randomstring.js index 788461576..3815c66db 100644 --- a/src/node/utils/randomstring.js +++ b/src/node/utils/randomstring.js @@ -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;