1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Electron: E2EE config

This commit is contained in:
Laurent Cozic
2017-12-24 09:36:31 +01:00
parent d13c2cf8d7
commit d1abf4971d
7 changed files with 206 additions and 37 deletions

View File

@ -280,16 +280,11 @@ class EncryptionService {
await destination.append(this.encodeHeader_(header));
let fromIndex = 0;
while (true) {
const block = await source.read(this.chunkSize_);
if (!block) break;
fromIndex += block.length;
const encrypted = await this.encrypt(method, masterKeyPlainText, block);
await destination.append(padLeft(encrypted.length.toString(16), 6, '0'));
await destination.append(encrypted);
}