1 2 3 4 5 6
// Trait defining a generic hash algorithm pub trait HashAlgorithm { fn new() -> Self where Self: Sized; fn update(&mut self, data: &[u8]); fn finalize(&mut self) -> String; }