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

Method getKeysByFprs

src/modules/KeyringBase.js:253–261  ·  view source on GitHub ↗

* Get keys by fingerprints * @param {Array } keyFprs * @param {Boolean} deep * @return {Array }

(keyFprs, deep)

Source from the content-addressed store, hash-verified

251 * @return {Array<openpgp.key.Key>}
252 */
253 getKeysByFprs(keyFprs, deep) {
254 return keyFprs.map(keyFpr => {
255 const keyArray = this.keystore.getKeysForId(keyFpr, deep);
256 if (keyArray) {
257 return keyArray[0];
258 }
259 throw new MvError(`No key found for ID ${keyFpr}`, 'NO_KEY_FOUND_FOR_ENCRYPTION');
260 });
261 }
262
263 /**
264 * Find key or sub key packet by keyId and return fingerprint

Callers 4

getKeyByAddressFunction · 0.80
logEncryptionFunction · 0.80
encryptFunction · 0.80

Calls 1

getKeysForIdMethod · 0.80

Tested by

no test coverage detected