new randomString function should take len arg

This commit is contained in:
Robert Helmer 2014-01-15 11:25:33 -08:00
parent 9ef709e7f7
commit ae99c5ea6f

View file

@ -5,7 +5,7 @@ var crypto = require('crypto');
var randomString = function randomString(len) var randomString = function randomString(len)
{ {
crypto.randomBytes(48, function(ex, buf) { crypto.randomBytes(len, function(ex, buf) {
return buf.toString('hex'); return buf.toString('hex');
}); });
}; };