1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

hasEncKey checks

This commit is contained in:
Kyle Spearrin
2018-07-12 17:07:06 -04:00
parent 5fac067713
commit cc6f732a14
3 changed files with 7 additions and 2 deletions

View File

@@ -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);