1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

Expose getKeyFromStorage with userId (#633)

This commit is contained in:
Oscar Hinton 2022-01-25 15:45:02 +01:00 committed by GitHub
parent a985621bb9
commit e1d4c4c903
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ export abstract class CryptoService {
) => Promise<void>; ) => Promise<void>;
setProviderKeys: (orgs: ProfileProviderResponse[]) => Promise<void>; setProviderKeys: (orgs: ProfileProviderResponse[]) => Promise<void>;
getKey: (keySuffix?: KeySuffixOptions, userId?: string) => Promise<SymmetricCryptoKey>; getKey: (keySuffix?: KeySuffixOptions, userId?: string) => Promise<SymmetricCryptoKey>;
getKeyFromStorage: (keySuffix: KeySuffixOptions) => Promise<SymmetricCryptoKey>; getKeyFromStorage: (keySuffix: KeySuffixOptions, userId?: string) => Promise<SymmetricCryptoKey>;
getKeyHash: () => Promise<string>; getKeyHash: () => Promise<string>;
compareAndUpdateKeyHash: (masterPassword: string, key: SymmetricCryptoKey) => Promise<boolean>; compareAndUpdateKeyHash: (masterPassword: string, key: SymmetricCryptoKey) => Promise<boolean>;
getEncKey: (key?: SymmetricCryptoKey) => Promise<SymmetricCryptoKey>; getEncKey: (key?: SymmetricCryptoKey) => Promise<SymmetricCryptoKey>;

View File

@ -38,9 +38,9 @@ export class ElectronCryptoService extends CryptoService {
} }
} }
protected async retrieveKeyFromStorage(keySuffix: KeySuffixOptions) { protected async retrieveKeyFromStorage(keySuffix: KeySuffixOptions, userId?: string) {
await this.upgradeSecurelyStoredKey(); await this.upgradeSecurelyStoredKey();
return super.retrieveKeyFromStorage(keySuffix); return super.retrieveKeyFromStorage(keySuffix, userId);
} }
/** /**