1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 03:03:43 +00:00

separate the user key in memory from user keys in storage

This commit is contained in:
Jacob Fink
2023-05-30 11:11:26 -04:00
parent f2e7a8ad11
commit 4772166e83
2 changed files with 9 additions and 15 deletions

View File

@@ -17,7 +17,7 @@ export abstract class CryptoService {
getKeyForUserEncryption: (key?: SymmetricCryptoKey) => Promise<SymmetricCryptoKey>;
setUserKey: (key: UserSymKey) => Promise<void>;
getUserKey: (keySuffix?: KeySuffixOptions, userId?: string) => Promise<UserSymKey>;
getUserKeyFromMemory: (userId?: string) => Promise<UserSymKey>;
getUserKeyFromStorage: (keySuffix: KeySuffixOptions, userId?: string) => Promise<UserSymKey>;
hasUserKey: () => Promise<boolean>;
hasUserKeyInMemory: (userId?: string) => Promise<boolean>;
@@ -84,7 +84,6 @@ export abstract class CryptoService {
decryptToUtf8: (encString: EncString, key?: SymmetricCryptoKey) => Promise<string>;
decryptFromBytes: (encBuffer: EncArrayBuffer, key: SymmetricCryptoKey) => Promise<ArrayBuffer>;
setEncKey: (encKey: string) => Promise<void>;
getEncKey: (key?: SymmetricCryptoKey) => Promise<SymmetricCryptoKey>;
hasEncKey: () => Promise<boolean>;
clearEncKey: (memoryOnly?: boolean, userId?: string) => Promise<any>;
toggleKey: () => Promise<any>;