(options)
| 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 => { |
no test coverage detected