feat: use dpapi for windows to ensure longer passwords work

This commit is contained in:
2025-07-16 21:48:17 +02:00
parent 4e4998671a
commit d685114bd7
8 changed files with 78 additions and 80 deletions

View File

@@ -26,7 +26,7 @@
import { Buffer } from 'buffer';
import { Toaster } from '@/components/ui/sonner';
import { userAuth } from '@/userAuthentication';
import { exit, getLauncherVersion, getPlatform } from '@/osuUtil';
import { encryptString, exit, getLauncherVersion, getPlatform } from '@/osuUtil';
import Button from '@/components/ui/button/button.svelte';
import * as presence from '@/presence';
@@ -88,6 +88,13 @@
onMount(async () => {
window.Buffer = Buffer;
/* const decryptTest = "AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAs463WdMtG0mr/mVLQCZ6dQAAAAAIAAAAUgBhAHcAAAAQZgAAAAEAACAAAABnyhFo8QK2iL5aTehKmsZSUpihGWBwlKfYj7cL2/lDagAAAAAOgAAAAAIAACAAAABMxyG6EdkLORSMB8isbltZhPQV2iVQ2r+yJLJ2Tw9yWiAAAABE1EzBPD9PRFQ3evk0vneNpfQTNTvMpjDVUTl3kAaKWUAAAADBshJzPDx6qcYfYh2zh6cKJWClZpIp6H50IKriW936XGhLFQboK/m18O77TBnpSrs0YosFjzsYVJTkrWjetFAf";
const decrypted = await decryptString(decryptTest);
console.log(decrypted); */
const encrypted = await encryptString("Todesengel007008009!", "cu24180ncjeiu0ci1nwui");
console.log(encrypted);
disableReload();
setupValues();
launcherVersion.set(await getLauncherVersion());