MCPcopy
hub / github.com/mailvelope/mailvelope / unlock

Function unlock

src/modules/pwdCache.js:243–254  ·  view source on GitHub ↗
({key, password, message})

Source from the content-addressed store, hash-verified

241 * @return {Promise<openpgp.key.Key, Error>} return the unlocked key
242 */
243export async function unlock({key, password, message}) {
244 const unlockedKey = await unlockKey(key, password);
245 const options = {key: unlockedKey, password};
246 if (message) {
247 options.reservedOperations = getReservedOperations({key: unlockedKey, message});
248 }
249 if (active) {
250 // set unlocked key in cache
251 set(options);
252 }
253 return unlockedKey;
254}
255
256async function unlockKey(privKey, passwd) {
257 try {

Callers 2

unlockKeyFunction · 0.90
pgpModel-test.jsFile · 0.90

Calls 3

getReservedOperationsFunction · 0.85
unlockKeyFunction · 0.70
setFunction · 0.70

Tested by

no test coverage detected