(unlockedKey, passphrase)
| 311 | } |
| 312 | |
| 313 | async setKeyPwd(unlockedKey, passphrase) { |
| 314 | const updatedKey = await encryptKey({privateKey: unlockedKey, passphrase}); |
| 315 | const fingerprint = updatedKey.getFingerprint(); |
| 316 | await super.removeKey(fingerprint, 'private'); |
| 317 | await this.sync.add(fingerprint, keyringSync.UPDATE); |
| 318 | this.addKey(updatedKey); |
| 319 | await this.keystore.store(); |
| 320 | await this.sync.commit(); |
| 321 | } |
| 322 | |
| 323 | async generateKey(options) { |
| 324 | const newKey = await super.generateKey(options); |