mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 16:36:15 -04:00
lint: src/node/utils/randomstring.js
This commit is contained in:
parent
21ef857d8a
commit
89aa8cf55e
1 changed files with 4 additions and 4 deletions
|
@ -1,10 +1,10 @@
|
||||||
|
'use strict';
|
||||||
/**
|
/**
|
||||||
* Generates a random String with the given length. Is needed to generate the Author, Group, readonly, session Ids
|
* Generates a random String with the given length. Is needed to generate the
|
||||||
|
* Author, Group, readonly, session Ids
|
||||||
*/
|
*/
|
||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
|
|
||||||
const randomString = function (len) {
|
const randomString = (len) => crypto.randomBytes(len).toString('hex');
|
||||||
return crypto.randomBytes(len).toString('hex');
|
|
||||||
};
|
|
||||||
|
|
||||||
module.exports = randomString;
|
module.exports = randomString;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue