Struct extra::sha1::Sha1

pub struct Sha1 {
    priv h: [u32, ..DIGEST_BUF_LEN],
    priv length_bits: u64,
    priv buffer: FixedBuffer64,
    priv computed: bool,
}

Structure representing the state of a Sha1 computation

Methods

impl Sha1

fn new() -> Sha1

Construct a sha object

Trait Implementations

impl Digest for Sha1

fn reset(&mut self)

Reset the digest. This method must be called after result() and before supplying more data.

fn input(&mut self, msg: &[u8])

Provide message data.

Arguments

  • input - A vector of message data

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

Retrieve the digest result. This method may be called multiple times.

Arguments

  • out - the vector to hold the result. Must be large enough to contain output_bits().

fn output_bits(&self) -> uint

Get the output size in bits.