method to clear signature field

This commit is contained in:
Bruce Leidl 2019-01-29 13:39:30 -05:00
parent 0299d2814f
commit c13fb5fb61

View File

@ -226,6 +226,11 @@ impl ImageHeader {
Ok(()) Ok(())
} }
pub fn clear_signature(&self) -> Result<()> {
let zeros = vec![0u8; SIGNATURE_LENGTH];
self.set_signature(&zeros)
}
pub fn public_key(&self) -> Result<Option<PublicKey>> { pub fn public_key(&self) -> Result<Option<PublicKey>> {
let metainfo = self.metainfo()?; let metainfo = self.metainfo()?;
public_key_for_channel(metainfo.channel()) public_key_for_channel(metainfo.channel())