MCPcopy
hub / github.com/mailvelope/mailvelope / validateKeyPassword

Method validateKeyPassword

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

Source from the content-addressed store, hash-verified

215 }
216
217 async validateKeyPassword({fingerprint, keyringId, password}) {
218 const cached = getKeyPwdFromCache(fingerprint);
219 if (cached && cached.password) {
220 return password === cached.password;
221 } else {
222 const key = (await keyringById(keyringId)).getPrivateKeyByFpr(fingerprint);
223 try {
224 await unlockKey({key, password});
225 return true;
226 } catch (e) {
227 return false;
228 }
229 }
230 }
231
232 async getArmoredKeys({keyFprs, options, keyringId}) {
233 const keyring = await keyringById(keyringId);

Callers

nothing calls this directly

Calls 2

getPrivateKeyByFprMethod · 0.80
unlockKeyFunction · 0.50

Tested by

no test coverage detected