Hash public key directly for stanza tag

Closes str4d/age-plugin-yubikey#32.
This commit is contained in:
Jack Grigg
2021-04-23 23:01:08 +12:00
parent 6da29e7125
commit 72c5278de0
+1 -1
View File
@@ -57,7 +57,7 @@ impl Recipient {
}
pub(crate) fn tag(&self) -> [u8; TAG_BYTES] {
let tag = Sha256::digest(self.to_string().as_bytes());
let tag = Sha256::digest(self.to_encoded().as_bytes());
(&tag[0..TAG_BYTES]).try_into().expect("length is correct")
}