mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 07:35:05 -04:00
8 lines
256 B
TypeScript
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');
|