summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-03-01 16:38:50 +0100
committerNeal H. Walfield <neal@pep.foundation>2020-03-01 16:38:50 +0100
commit821bf4075ba40feacc4e9d34afebe6257f3667c9 (patch)
treed85fb72cab42a5ac85b7b989d64b5e99d14ab307
parent4ad415af5d0e76918b6e3199941cad753ac59dda (diff)
oopenpgp: Add a conversion from [u8; 8] to a KeyID.
-rw-r--r--openpgp/src/keyid.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/openpgp/src/keyid.rs b/openpgp/src/keyid.rs
index 0504abda..2a9f121d 100644
--- a/openpgp/src/keyid.rs
+++ b/openpgp/src/keyid.rs
@@ -45,6 +45,12 @@ impl From<u64> for KeyID {
}
}
+impl From<[u8; 8]> for KeyID {
+ fn from(id: [u8; 8]) -> Self {
+ KeyID::from_bytes(&id[..])
+ }
+}
+
impl From<&Fingerprint> for KeyID {
fn from(fp: &Fingerprint) -> Self {
match fp {