[−][src]Struct sha1::Sha1
Represents a Sha1 hash object in memory.
Methods
impl Sha1
[src][−]
pub fn new() -> Sha1
[src][−]
Creates an fresh sha1 hash object.
This is equivalent to creating a hash with Default::default
.
pub fn from<D: AsRef<[u8]>>(data: D) -> Sha1
[src][−]
Shortcut to create a sha1 from some bytes.
This also lets you create a hash from a utf-8 string. This is equivalent
to making a new Sha1 object and calling update
on it once.
pub fn reset(&mut self)
[src][−]
Resets the hash object to it's initial state.
pub fn update(&mut self, data: &[u8])
[src][−]
Update hash with input data.
pub fn digest(&self) -> Digest
[src][−]
Retrieve digest result.
Trait Implementations
impl Clone for Sha1
[src][+]
impl Default for Sha1
[src][+]
impl Eq for Sha1
[src]
impl Hash for Sha1
[src][+]
impl Ord for Sha1
[src][+]
impl PartialEq<Sha1> for Sha1
[src][+]
impl PartialOrd<Sha1> for Sha1
[src][+]
impl StructuralEq for Sha1
[src]
impl StructuralPartialEq for Sha1
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,