diff options
author | Neal H. Walfield <neal@pep.foundation> | 2020-03-01 16:38:50 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2020-03-01 16:38:50 +0100 |
commit | 821bf4075ba40feacc4e9d34afebe6257f3667c9 (patch) | |
tree | d85fb72cab42a5ac85b7b989d64b5e99d14ab307 /openpgp/src/keyid.rs | |
parent | 4ad415af5d0e76918b6e3199941cad753ac59dda (diff) |
oopenpgp: Add a conversion from [u8; 8] to a KeyID.
Diffstat (limited to 'openpgp/src/keyid.rs')
-rw-r--r-- | openpgp/src/keyid.rs | 6 |
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 { |