pub struct Sha1(_);
Expand description
An object which calculates a SHA1 hash of some data.
Warning
SHA1 is known to be insecure - it should not be used unless required for compatibility with existing systems.
Implementations§
source§impl Sha1
impl Sha1
sourcepub fn update(&mut self, buf: &[u8])
pub fn update(&mut self, buf: &[u8])
Feeds some data into the hasher.
This can be called multiple times.
This corresponds to SHA1_Update
.
sourcepub fn finish(self) -> [u8; 20]
pub fn finish(self) -> [u8; 20]
Returns the hash of the data.
This corresponds to SHA1_Final
.