MCPcopy
hub / github.com/mailvelope/mailvelope / encryptFile

Method encryptFile

src/controller/app.controller.js:296–310  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

294 }
295
296 async encryptFile(options) {
297 options.unlockKey = async options => {
298 options.reason = 'PWD_DIALOG_REASON_SIGN';
299 const result = await this.unlockKey(options);
300 return result;
301 };
302 if (prefs.prefs.general.auto_add_primary) {
303 // get the sender key fingerprint
304 const defaultKeyFpr = await getDefaultKeyFpr(MAIN_KEYRING_ID);
305 if (defaultKeyFpr && !options.encryptionKeyFprs.includes(defaultKeyFpr)) {
306 options.encryptionKeyFprs.push(defaultKeyFpr);
307 }
308 }
309 return encryptFile(options);
310 }
311
312 decryptFile(options) {
313 options.unlockKey = async options => {

Callers 1

encryptFilesMethod · 0.80

Calls 4

unlockKeyMethod · 0.95
getDefaultKeyFprFunction · 0.90
encryptFileFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected