pub type HashType = Sha512Hash;
Expand description
The type used to store the hash of each item.
It is a result of the SHA512
algorithm as a newtype 64 byte array marked with #[repr(transparent)]
.
If you want to get the bytes from it, you can transmute safely.
fn hash_bytes(hash: HashType) -> [u8; 64]
{
unsafe {
std::mem::transmute(hash)
}
}
fn hash_bytes_assert()
{
assert_eq!(hash_bytes(Default::default()), [0u8; 64]);
}
Aliased Typeยง
pub struct HashType(/* private fields */);