mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-08 11:12:01 +01:00
10 lines
278 B
JavaScript
10 lines
278 B
JavaScript
'use strict';
|
|
/**
|
|
* Generates a random String with the given length. Is needed to generate the
|
|
* Author, Group, readonly, session Ids
|
|
*/
|
|
const crypto = require('crypto');
|
|
|
|
const randomString = (len) => crypto.randomBytes(len).toString('hex');
|
|
|
|
module.exports = randomString;
|