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

Function verify

src/modules/openpgpjs.js:112–122  ·  view source on GitHub ↗
({message, plaintext, detachedSignature, keyring})

Source from the content-addressed store, hash-verified

110 * @return {{data: String, signatures: Array<{keyId: String, fingerprint: String, valid: Boolean}>}}
111 */
112export async function verify({message, plaintext, detachedSignature, keyring}) {
113 let signature;
114 if (plaintext && detachedSignature) {
115 signature = await readSignature({armoredSignature: detachedSignature});
116 message = await createMessage({text: plaintext});
117 }
118 const verificationKeys = keyring.keystore.getAllKeys();
119 let {data, signatures} = await pgpVerify({message, verificationKeys, signature});
120 signatures = await mapSignatures(signatures, keyring);
121 return {data, signatures};
122}

Callers

nothing calls this directly

Calls 2

getAllKeysMethod · 0.80
mapSignaturesFunction · 0.70

Tested by

no test coverage detected