new randomString function should take len arg
This commit is contained in:
parent
9ef709e7f7
commit
ae99c5ea6f
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ var crypto = require('crypto');
|
|||
|
||||
var randomString = function randomString(len)
|
||||
{
|
||||
crypto.randomBytes(48, function(ex, buf) {
|
||||
crypto.randomBytes(len, function(ex, buf) {
|
||||
return buf.toString('hex');
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue