pub trait Digest {
    // Required methods
    fn reset(&mut self) -> &mut Self;
    fn update(&mut self, value: &[u8]) -> &mut Self;
    fn update_file(&mut self, path: &str) -> &mut Self;
    fn hexdigest(value: &str) -> String;
    fn hexdigest_file(path: &str) -> String;
    fn reset_file(&mut self, path: &str) -> &mut Self;
}
Expand description

Re-exported main mdg module from mdg for MD5 hashing. The Digest trait.

Required Methods§

source

fn reset(&mut self) -> &mut Self

reset the internal state of the object

source

fn update(&mut self, value: &[u8]) -> &mut Self

update the internal state of the object with new data

source

fn update_file(&mut self, path: &str) -> &mut Self

update the internal state of the object with new data from a file

source

fn hexdigest(value: &str) -> String

return the digest value as a string of hexadecimal digits

source

fn hexdigest_file(path: &str) -> String

return the digest value as a string of hexadecimal digits from a file

source

fn reset_file(&mut self, path: &str) -> &mut Self

reset the internal state of the object and update it with new data from a file

Object Safety§

This trait is not object safe.

Implementors§