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

Function importPublicKey

src/content-scripts/clientAPI.js:249–260  ·  view source on GitHub ↗
({keyringId, armored})

Source from the content-addressed store, hash-verified

247}
248
249function importPublicKey({keyringId, armored}) {
250 switch (getMessageType(armored)) {
251 case PGP_PUBLIC_KEY:
252 // ok
253 break;
254 case PGP_PRIVATE_KEY:
255 throw new MvError('No import of private PGP keys allowed.', 'WRONG_ARMORED_TYPE');
256 default:
257 throw new MvError('No valid armored block found.', 'WRONG_ARMORED_TYPE');
258 }
259 return controllerPort.send('import-pub-key', {keyringId, armored});
260}
261
262function processAutocryptHeader({keyringId, headers}) {
263 return controllerPort.send('process-autocrypt-header', {keyringId, headers});

Callers

nothing calls this directly

Calls 2

getMessageTypeFunction · 0.90
sendMethod · 0.45

Tested by

no test coverage detected