MCPcopy
hub / github.com/mailvelope/mailvelope / loadKeys

Method loadKeys

src/modules/KeyStoreLocal.js:19–32  ·  view source on GitHub ↗
(keysArmored, keyArray = [])

Source from the content-addressed store, hash-verified

17 }
18
19 async loadKeys(keysArmored, keyArray = []) {
20 if (!keysArmored) {
21 return;
22 }
23 for (const armoredKey of keysArmored) {
24 try {
25 const key = await readKey({armoredKey});
26 keyArray.push(key);
27 } catch (e) {
28 console.log('Error parsing armored PGP key:', e);
29 }
30 }
31 return keyArray;
32 }
33
34 async store() {
35 await this.storePublic();

Callers 2

loadMethod · 0.95

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected