6 lines
145 B
TypeScript
6 lines
145 B
TypeScript
import * as crypto from 'crypto';
|
|
|
|
export function generateRandomString(length: number) {
|
|
return crypto.randomBytes(length).toString('hex');
|
|
}
|