mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
desktop: disable os encryption of keystore in portable app
This commit is contained in:
@@ -392,7 +392,11 @@ class KeyStore extends BaseStore<KeyStore> {
|
||||
this.#wrappingKeyId
|
||||
);
|
||||
|
||||
if (desktop && !wrappingKey) {
|
||||
if (
|
||||
desktop &&
|
||||
!wrappingKey &&
|
||||
(await desktop.safeStorage.isEncryptionAvailable.query())
|
||||
) {
|
||||
const decrypted = Buffer.from(
|
||||
await desktop.safeStorage.decryptString.query(
|
||||
Buffer.from(wrappedKey).toString("base64")
|
||||
@@ -424,7 +428,11 @@ class KeyStore extends BaseStore<KeyStore> {
|
||||
["encrypt", "decrypt"]
|
||||
));
|
||||
|
||||
if (IS_DESKTOP_APP && desktop) {
|
||||
if (
|
||||
IS_DESKTOP_APP &&
|
||||
desktop &&
|
||||
(await desktop.safeStorage.isEncryptionAvailable.query())
|
||||
) {
|
||||
const encrypted = Buffer.from(
|
||||
await desktop.safeStorage.encryptString.query(
|
||||
Buffer.from(
|
||||
|
||||
Reference in New Issue
Block a user