[][src]Struct sha1::Sha1

pub struct Sha1 { /* fields omitted */ }

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 max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<Sha1> for Sha1[src]

impl Hash for Sha1[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Clone for 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

impl Unpin for Sha1

impl Send for Sha1

impl Sync for Sha1

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]