Skip to content

Commit

Permalink
Fix signature verification examples in the README (#1058)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenlhlinux committed Mar 12, 2020
1 parent 66d83db commit b76c67a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -460,7 +460,7 @@ Using the private key:
});
console.log(cleartext); // '-----BEGIN PGP SIGNED MESSAGE ... END PGP SIGNATURE-----'

const { signatures } = await openpgp.verify({
const verified = await openpgp.verify({
message: await openpgp.cleartext.readArmored(cleartext), // parse armored message
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys // for verification
});
Expand Down Expand Up @@ -495,7 +495,7 @@ Using the private key:
});
console.log(detachedSignature);

const { signatures } = await openpgp.verify({
const verified = await openpgp.verify({
message: openpgp.cleartext.fromText('Hello, World!'), // CleartextMessage or Message object
signature: await openpgp.signature.readArmored(detachedSignature), // parse detached signature
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys // for verification
Expand Down Expand Up @@ -537,7 +537,7 @@ Using the private key:
});
console.log(signatureArmored); // ReadableStream containing '-----BEGIN PGP MESSAGE ... END PGP MESSAGE-----'

const { signatures } = await openpgp.verify({
const verified = await openpgp.verify({
message: await openpgp.message.readArmored(signatureArmored), // parse armored signature
publicKeys: (await openpgp.key.readArmored(publicKeyArmored)).keys // for verification
});
Expand Down

0 comments on commit b76c67a

Please sign in to comment.