mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-31 19:02:59 +01:00
Merge pull request #2068 from webzwo0i/fix-randomstring
fix randomstring
This commit is contained in:
commit
4b87f77aae
1 changed files with 2 additions and 4 deletions
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue