mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-10 13:37:01 +03:00
lockCategoriesHTTP
- highLoad - compact getUserID - add genRandomValue method
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import crypto from "crypto";
|
||||
|
||||
export const genRandom = (bytes=8) => crypto.pseudoRandomBytes(bytes).toString("hex");
|
||||
|
||||
export const genRandomValue = (prefix: string, identifier: string, bytes=8) => `${prefix}-${identifier}-${genRandom(bytes)}`;
|
||||
Reference in New Issue
Block a user