Struct mini_functions::md5::MD5
source · pub struct MD5 {
pub buffer: [u8; 64],
pub count: [u32; 2],
pub digest: [u8; 16],
pub state: [u32; 4],
}
Expand description
Re-exported main mdg
module from mdg for MD5 hashing.
The MD5 struct.
Fields§
§buffer: [u8; 64]
The buffer.
count: [u32; 2]
The count.
digest: [u8; 16]
The digest.
state: [u32; 4]
The state.
Implementations§
source§impl MD5
impl MD5
sourcepub fn finalize(&mut self) -> &MD5
pub fn finalize(&mut self) -> &MD5
Finalize the MD5 object and return the result as a 16-byte array.
sourcepub fn transform(&mut self, data: &[u8]) -> &mut MD5
pub fn transform(&mut self, data: &[u8]) -> &mut MD5
Update the internal state of the MD5 object with new data.
sourcepub fn update_with_len(&mut self, value: &[u8], nbytes: usize) -> &mut MD5
pub fn update_with_len(&mut self, value: &[u8], nbytes: usize) -> &mut MD5
Update the internal state of the MD5 object with new data.
Trait Implementations§
source§impl Digest for MD5
impl Digest for MD5
source§fn update(&mut self, value: &[u8]) -> &mut MD5
fn update(&mut self, value: &[u8]) -> &mut MD5
Update the internal state of the MD5 object with new data.
source§fn update_file(&mut self, path: &str) -> &mut MD5
fn update_file(&mut self, path: &str) -> &mut MD5
Update the internal state of the MD5 object with new data from a file.
source§fn hexdigest(value: &str) -> String
fn hexdigest(value: &str) -> String
Return the digest value as a string of hexadecimal digits.
source§fn hexdigest_file(path: &str) -> String
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 MD5
fn reset_file(&mut self, path: &str) -> &mut MD5
Reset the internal state of the MD5 object and update it with new data from a file.
impl Copy for MD5
impl Eq for MD5
impl StructuralEq for MD5
impl StructuralPartialEq for MD5
Auto Trait Implementations§
impl RefUnwindSafe for MD5
impl Send for MD5
impl Sync for MD5
impl Unpin for MD5
impl UnwindSafe for MD5
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.