This commit is contained in:
2026-08-22 23:10:31 +00:00
parent 0047f2ca85
commit 944cd5456f
-7
View File
@@ -1,7 +0,0 @@
// Generate a readable temporary password (no ambiguous chars) for new accounts.
export function genTempPassword(len = 12): string {
const chars = "ABCDEFGHJKMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz23456789";
const arr = new Uint32Array(len);
crypto.getRandomValues(arr);
return Array.from(arr, (n) => chars[n % chars.length]).join("");
}