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

Method removeKey

src/modules/KeyringBase.js:285–296  ·  view source on GitHub ↗
(fingerprint, type)

Source from the content-addressed store, hash-verified

283 }
284
285 removeKey(fingerprint, type) {
286 let removedKey;
287 if (type === 'public') {
288 removedKey = this.keystore.publicKeys.removeForId(fingerprint);
289 } else if (type === 'private') {
290 removedKey = this.keystore.privateKeys.removeForId(fingerprint);
291 }
292 if (!removedKey) {
293 throw new Error('removeKey: key not found');
294 }
295 return removedKey;
296 }
297
298 addKey(key) {
299 if (key.isPrivate()) {

Callers

nothing calls this directly

Calls 1

removeForIdMethod · 0.80

Tested by

no test coverage detected