etherpad-lite/src/node/utils/randomstring.ts
2024-07-22 14:53:37 +02:00

8 lines
256 B
TypeScript

'use strict';
/**
* Generates a random String with the given length. Is needed to generate the
* Author, Group, readonly, session Ids
*/
import {randomBytes} from 'crypto';
export const randomString = (len: number) => randomBytes(len).toString('hex');