Hash public key directly for stanza tag
Closes str4d/age-plugin-yubikey#32.
This commit is contained in:
+1
-1
@@ -57,7 +57,7 @@ impl Recipient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn tag(&self) -> [u8; TAG_BYTES] {
|
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")
|
(&tag[0..TAG_BYTES]).try_into().expect("length is correct")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user