mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-01-24 16:14:10 +01:00
11 lines
275 B
JavaScript
11 lines
275 B
JavaScript
/**
|
|
* Generates a random String with the given length. Is needed to generate the Author, Group, readonly, session Ids
|
|
*/
|
|
var crypto = require('crypto');
|
|
|
|
var randomString = function(len)
|
|
{
|
|
return crypto.randomBytes(len).toString('hex')
|
|
};
|
|
|
|
module.exports = randomString;
|