MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / convertChangeLog

Function convertChangeLog

src/modules/pgpModel.js:459–476  ·  view source on GitHub ↗
(key, changeLog, syncData)

Source from the content-addressed store, hash-verified

457}
458
459function convertChangeLog(key, changeLog, syncData) {
460 const fingerprint = key.getFingerprint();
461 const logEntry = changeLog[fingerprint];
462 if (!logEntry) {
463 console.log(`Key ${fingerprint} in keyring but not in changeLog.`);
464 return;
465 }
466 if (logEntry.type === keyringSync.INSERT) {
467 syncData.insertedKeys[fingerprint] = {
468 armored: key.armor(),
469 time: logEntry.time
470 };
471 } else if (logEntry.type === keyringSync.DELETE) {
472 console.log(`Key ${fingerprint} in keyring but has DELETE in changeLog.`);
473 } else {
474 console.log('Invalid changeLog type:', logEntry.type);
475 }
476}
477
478/**
479 * Encrypt file

Callers 1

encryptSyncMessageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected