export function generateSecret(bytes = 32): string { const arr = new Uint8Array(bytes); crypto.getRandomValues(arr); let bin = ""; arr.forEach((b) => (bin += String.fromCharCode(b))); return btoa(bin); }