OpenAuth_server/src/helper/random.ts

6 lines
155 B
TypeScript

import { randomBytes } from "crypto";
export function randomString(length: number) {
return randomBytes(length).toString("base64").slice(0, length);
}