SponsorBlockServer/test/utils/getRandom.ts

4 lines
117 B
TypeScript
Raw Normal View History

2023-02-21 09:24:07 +01:00
import crypto from "crypto";
export const genRandom = (bytes=8) => crypto.pseudoRandomBytes(bytes).toString("hex");