feat: use dpapi for windows to ensure longer passwords work
This commit is contained in:
@@ -138,4 +138,6 @@ export const hasWMCTRL = async () =>
|
||||
export const hasOsuWinello = async () =>
|
||||
await invoke<boolean>('has_osuwinello');
|
||||
export const hasNet8 = async () =>
|
||||
await invoke<boolean>('has_net8');
|
||||
await invoke<boolean>('has_net8');
|
||||
export const encryptString = async (str: string, entropy: string) =>
|
||||
await invoke<string>('encrypt_string', {string: str, entropy});
|
@@ -83,6 +83,7 @@
|
||||
import { osuapi } from '@/api/osuapi';
|
||||
import {
|
||||
downloadEZPPLauncherUpdateFiles,
|
||||
encryptString,
|
||||
exit,
|
||||
getBeatmapSetsCount,
|
||||
getEZPPLauncherUpdateFiles,
|
||||
@@ -296,7 +297,7 @@
|
||||
},
|
||||
{
|
||||
key: 'Password',
|
||||
value: password,
|
||||
value: $platform === "windows" ? await encryptString(password, "cu24180ncjeiu0ci1nwui") : password,
|
||||
},
|
||||
{
|
||||
key: 'SaveUsername',
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user