mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
암호 키 생성 및 등록시 최초 MEK도 함께 생성 및 등록하도록 구현
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { exportRSAKeyToBase64 } from "$lib/modules/crypto";
|
||||
import { encodeToBase64, exportRSAKey } from "$lib/modules/crypto";
|
||||
import { requestPubKeyRegistration } from "../../key/export/service";
|
||||
|
||||
const callLoginAPI = async (email: string, password: string, pubKeyBase64?: string) => {
|
||||
@@ -22,7 +22,7 @@ export const requestLogin = async (
|
||||
registerPubKey = true,
|
||||
): Promise<boolean> => {
|
||||
const pubKeyBase64 = keyPair
|
||||
? await exportRSAKeyToBase64(keyPair.publicKey, "public")
|
||||
? encodeToBase64((await exportRSAKey(keyPair.publicKey, "public")).key)
|
||||
: undefined;
|
||||
let loginRes = await callLoginAPI(email, password, pubKeyBase64);
|
||||
if (loginRes.ok) {
|
||||
|
||||
Reference in New Issue
Block a user