Trait Digest

Source
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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§