Trait Hash
rcmerkle
pub trait Hash: Default + Clone + Eq + PartialEq { fn hash(data: &[u8]) -> Self; fn to_string(hash: &Self) -> String; }
trait to define different hash function
fn hash(data: &[u8]) -> Self
fn to_string(hash: &Self) -> String
impl Hash for Keccak256
impl Hash for SHA256