Struct sha1::Sha1 [] [src]

pub struct Sha1 {
    // some fields omitted
}
[]

Represents a Sha1 hash object in memory.

Methods

impl Sha1

fn new() -> Sha1[]

Creates an fresh sha1 hash object.

fn reset(&mut self)[]

Resets the hash object to it's initial state.

fn update(&mut self, data: &[u8])[]

Update hash with input data.

fn output(&self, out: &mut [u8])[]

Retrieve digest result. The output must be large enough to contain result (20 bytes).

fn digest(&self) -> Vec<u8>[]

Shortcut for getting output into a new vector.

fn hexdigest(&self) -> String[]

Shortcut for getting a hex output of the vector.

Trait Implementations

Derived Implementations

impl Clone for Sha1

fn clone(&self) -> Sha1

fn clone_from(&mut self, source: &Self)