mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 01:03:35 +00:00
hasEncKey checks
This commit is contained in:
@@ -211,6 +211,11 @@ export class CryptoService implements CryptoServiceAbstraction {
|
||||
return (await this.getKey()) != null;
|
||||
}
|
||||
|
||||
async hasEncKey(): Promise<boolean> {
|
||||
const encKey = await this.storageService.get<string>(Keys.encKey);
|
||||
return encKey != null;
|
||||
}
|
||||
|
||||
clearKey(): Promise<any> {
|
||||
this.key = this.legacyEtmKey = null;
|
||||
return this.secureStorageService.remove(Keys.key);
|
||||
|
||||
Reference in New Issue
Block a user