[−][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 PartialEq<Sha1> for Sha1
[src]
impl Eq for Sha1
[src]
impl Ord for Sha1
[src]
fn cmp(&self, other: &Sha1) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<Sha1> for Sha1
[src]
fn partial_cmp(&self, other: &Sha1) -> Option<Ordering>
[src]
fn lt(&self, other: &Sha1) -> bool
[src]
fn le(&self, other: &Sha1) -> bool
[src]
fn gt(&self, other: &Sha1) -> bool
[src]
fn ge(&self, other: &Sha1) -> bool
[src]
impl Hash for Sha1
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for Sha1
[src]
fn clone(&self) -> Sha1
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Sha1
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,