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§
Sourcefn update(&mut self, value: &[u8]) -> &mut Self
fn update(&mut self, value: &[u8]) -> &mut Self
update the internal state of the object with new data
Sourcefn update_file(&mut self, path: &str) -> &mut Self
fn update_file(&mut self, path: &str) -> &mut Self
update the internal state of the object with new data from a file
Sourcefn hexdigest_file(path: &str) -> String
fn hexdigest_file(path: &str) -> String
return the digest value as a string of hexadecimal digits from a file
Sourcefn reset_file(&mut self, path: &str) -> &mut Self
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.