refactor: update crypto envelope encryption and add canvas serialization support

This commit is contained in:
Your Name
2026-04-11 20:11:13 +05:30
parent 73a9787daf
commit cc9301740c
3 changed files with 1426 additions and 38 deletions
+12
View File
@@ -0,0 +1,12 @@
import { create } from "zustand";
interface KeyState {
masterKey: CryptoKey | null;
setMasterKey: (key: CryptoKey | null) => void;
}
// this key will be used to encrypt and decrypt the user's data
export const useKeyStore = create<KeyState>((set) => ({
masterKey: null,
setMasterKey: (masterKey) => set({ masterKey }),
}));