(id)
| 34 | } |
| 35 | |
| 36 | async 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. |
no test coverage detected