MCPcopy
hub / github.com/mailvelope/mailvelope / setKeyPwd

Method setKeyPwd

src/modules/KeyringLocal.js:313–321  ·  view source on GitHub ↗
(unlockedKey, passphrase)

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 5

addMethod · 0.80
addKeyMethod · 0.80
commitMethod · 0.80
removeKeyMethod · 0.45
storeMethod · 0.45

Tested by

no test coverage detected