MCPcopy
hub / github.com/mailvelope/mailvelope / autocrypt

Function autocrypt

src/modules/autocryptWrapper.js:36–48  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

34}
35
36async function autocrypt(id) {
37 if (!id) {
38 throw new MvError('Invalid Autocrypt Identity: id cannot be undefined', 'INVALID_ID');
39 }
40 const key = `mvelo.autocrypt.${id}`;
41 let storage = stores.get(key);
42 if (!storage) {
43 storage = new Store(key);
44 await storage.init();
45 stores.set(key, storage);
46 }
47 return new Autocrypt({storage});
48}
49
50/**
51 * Get a public key from autocrypt by email address.

Callers 2

lookupFunction · 0.85
processHeaderFunction · 0.85

Calls 3

getMethod · 0.45
initMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected