MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / setKeyPwd

Method setKeyPwd

src/controller/app.controller.js:208–215  ·  view source on GitHub ↗
({fingerprint, keyringId, currentPassword, password})

Source from the content-addressed store, hash-verified

206 }
207
208 async setKeyPwd({fingerprint, keyringId, currentPassword, password}) {
209 const keyring = await keyringById(keyringId);
210 const privateKey = keyring.getPrivateKeyByFpr(fingerprint);
211 const unlockedKey = await unlockKey({key: privateKey, password: currentPassword});
212 await keyring.setKeyPwd(unlockedKey, password);
213 await this.sendKeyUpdate();
214 deletePwdCache(fingerprint);
215 }
216
217 async validateKeyPassword({fingerprint, keyringId, password}) {
218 const cached = getKeyPwdFromCache(fingerprint);

Callers

nothing calls this directly

Calls 3

sendKeyUpdateMethod · 0.95
getPrivateKeyByFprMethod · 0.80
unlockKeyFunction · 0.50

Tested by

no test coverage detected