You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Electron: Improved enabling/disabling E2EE
This commit is contained in:
@ -43,6 +43,13 @@ class EncryptionService {
|
||||
return this.logger_;
|
||||
}
|
||||
|
||||
async generateMasterKeyAndEnableEncryption(password) {
|
||||
let masterKey = await this.generateMasterKey(password);
|
||||
masterKey = await MasterKey.save(masterKey);
|
||||
await this.enableEncryption(masterKey, password);
|
||||
await this.loadMasterKeysFromSettings();
|
||||
}
|
||||
|
||||
async enableEncryption(masterKey, password = null) {
|
||||
Setting.setValue('encryption.enabled', true);
|
||||
Setting.setValue('encryption.activeMasterKeyId', masterKey.id);
|
||||
|
Reference in New Issue
Block a user