summaryrefslogtreecommitdiffstats
path: root/openpgp/examples
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-04-01 19:34:19 +0200
committerNeal H. Walfield <neal@pep.foundation>2019-04-04 09:13:44 +0200
commitb0a368248e289b6f3d20fb4a7eeef9693f6c0126 (patch)
treef0f1992733cea58dd19ff2dc629e3e7f29328068 /openpgp/examples
parent19266d145ce2fedb63c6562ccc53848196f019eb (diff)
openpgp: Avoid key.fingerprint.to_keyid()
- Instead of using key.fingerprint.to_keyid(), use key.keyid().
Diffstat (limited to 'openpgp/examples')
-rw-r--r--openpgp/examples/decrypt-with.rs3
-rw-r--r--openpgp/examples/web-of-trust.rs2
2 files changed, 2 insertions, 3 deletions
diff --git a/openpgp/examples/decrypt-with.rs b/openpgp/examples/decrypt-with.rs
index 3d6118f0..3828e47f 100644
--- a/openpgp/examples/decrypt-with.rs
+++ b/openpgp/examples/decrypt-with.rs
@@ -63,8 +63,7 @@ impl Helper {
{
// This only works for unencrypted secret keys.
if let Ok(keypair) = key.clone().into_keypair() {
- keys.insert(key.fingerprint().to_keyid(),
- keypair);
+ keys.insert(key.keyid(), keypair);
}
}
}
diff --git a/openpgp/examples/web-of-trust.rs b/openpgp/examples/web-of-trust.rs
index eee9fffa..bfdd1558 100644
--- a/openpgp/examples/web-of-trust.rs
+++ b/openpgp/examples/web-of-trust.rs
@@ -36,7 +36,7 @@ fn main() {
for tpk in parser {
match tpk {
Ok(tpk) => {
- let keyid = tpk.fingerprint().to_keyid();
+ let keyid = tpk.keyid();
for uidb in tpk.userids() {
for tps in uidb.certifications() {
if let Some(issuer) = tps.get_issuer() {