pad.libre-service.eu-etherpad/src/node/utils/randomstring.js
2021-01-25 22:53:11 -05:00

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;