summaryrefslogtreecommitdiffstats
path: root/openpgp/src/keyid.rs
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2018-09-27 16:53:20 +0200
committerJustus Winter <justus@sequoia-pgp.org>2018-09-27 16:53:20 +0200
commit8e171156ef262d7ccaddcd960f238759cead5d4f (patch)
tree4957218e3db683471bed39cc30c85c33e12349ef /openpgp/src/keyid.rs
parentbe5c306f434b7bea04be3f905c0f1746c98049e9 (diff)
openpgp: Add predicate.
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r--openpgp/src/keyid.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs
index 2767afa8..c4fae110 100644
--- a/openpgp/src/keyid.rs
+++ b/openpgp/src/keyid.rs
@@ -97,6 +97,11 @@ impl KeyID {
}
}
+ /// Returns true if this is a wild card ID.
+ pub fn is_wildcard(&self) -> bool {
+ self.as_slice().iter().all(|b| *b == 0)
+ }
+
/// Converts the key ID to its standard representation.
///
/// Returns the fingerprint suitable for human consumption.