fix: gen crypto api key

This commit is contained in:
Rohit Rajan
2026-01-19 14:20:37 +05:30
parent 5157c6c6d2
commit 43302a5b1f

View File

@@ -1,3 +1,5 @@
import crypto from 'crypto';
export const genAPIKey = (): string => {
return [...Array(30)].map(() => ((Math.random() * 36) | 0).toString(36)).join('');
return crypto.randomBytes(24).toString('base64url');
};