HashOutput::from_bytes()

This commit is contained in:
Mike Dilger 2024-11-18 08:32:03 +13:00
parent af1d992ce7
commit 7b60e26714
No known key found for this signature in database
GPG Key ID: 47581A78D4329BA4

View File

@ -25,6 +25,10 @@ impl HashOutput {
}
}
pub fn from_bytes(bytes: [u8; 32]) -> HashOutput {
HashOutput(bytes)
}
pub fn to_pathbuf<P: AsRef<Path>>(&self, base: P) -> PathBuf {
let s = hex::encode(self.0);
let mut output: PathBuf = PathBuf::new();