mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-11-04 08:10:28 +09:00
키 관리 로직을 Keyring으로 통합하여 하드코딩된 MEK 및 HSK 버전을 제거하고 Svelte Store를 Rune으로 대체
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aee87fd9b6
commit
2ce73aa331
50 files changed
+633
-641
No files matched your search
@@ -3,25 +3,24 @@
|
||||
import { goto } from "$app/navigation";
|
||||
import { FullscreenDiv } from "#lib/components/atoms/index.js";
|
||||
import { TitledDiv } from "#lib/components/molecules/index.js";
|
||||
import { clientKeyStore, masterKeyStore } from "#lib/stores/index.js";
|
||||
import { generatePublicKeyFingerprint, requestMasterKeyDownload } from "./service";
|
||||
import {
|
||||
downloadMasterKeys,
|
||||
generatePublicKeyFingerprint,
|
||||
keyring,
|
||||
} from "#lib/client/keys/index.js";
|
||||
|
||||
import IconFingerprint from "~icons/material-symbols/fingerprint";
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
let fingerprint = $derived(
|
||||
$clientKeyStore
|
||||
? generatePublicKeyFingerprint($clientKeyStore.encryptKey, $clientKeyStore.verifyKey)
|
||||
keyring.clientKeys
|
||||
? generatePublicKeyFingerprint(keyring.clientKeys.encryptKey, keyring.clientKeys.verifyKey)
|
||||
: undefined,
|
||||
);
|
||||
|
||||
onMount(async () => {
|
||||
if (
|
||||
$masterKeyStore ||
|
||||
($clientKeyStore &&
|
||||
(await requestMasterKeyDownload($clientKeyStore.decryptKey, $clientKeyStore.verifyKey)))
|
||||
) {
|
||||
if (keyring.hasMasterKeys || (keyring.clientKeys && (await downloadMasterKeys()))) {
|
||||
await goto(data.redirectPath, { replace: true });
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user