[][src]Trait rcrypto::Digest

pub trait Digest {
    fn block_size(&self) -> Option<usize>;
fn bits_len(&self) -> usize;
fn write(&mut self, data: &[u8]);
fn checksum(&mut self, digest: &mut Vec<u8>);
fn reset(&mut self); }

A trait for message digest algorithm used in the cryptography

Required methods

fn block_size(&self) -> Option<usize>

used for HMAC, None means that the digest algorithm doesn't support used in the HMAC.

fn bits_len(&self) -> usize

the digest length(in bits)

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

write byte data to the Digester

fn checksum(&mut self, digest: &mut Vec<u8>)

compute the checksum for all data in the digester, the checksum will be same
if no new data write to the digester

fn reset(&mut self)

reset internal state of the Digester to the init state

Loading content...

Implementors

impl Digest for rcrypto::sha3::SHA224[src]

impl Digest for rcrypto::sha3::SHA256[src]

impl Digest for rcrypto::sha3::SHA384[src]

impl Digest for rcrypto::sha3::SHA512[src]

impl Digest for Shake128[src]

impl Digest for Shake256[src]

impl Digest for SHA1[src]

impl Digest for rcrypto::sha::SHA224[src]

impl Digest for rcrypto::sha::SHA256[src]

impl Digest for rcrypto::sha::SHA384[src]

impl Digest for rcrypto::sha::SHA512[src]

impl Digest for SHA512T224[src]

impl Digest for SHA512T256[src]

impl Digest for SHA512T[src]

impl Digest for MD5[src]

impl Digest for SHA3[src]

impl Digest for SHA[src]

impl Digest for SM3[src]

impl Digest for ZUCMac[src]

impl<C: Cipher> Digest for CMAC<C>[src]

impl<D: Digest> Digest for HMAC<D>[src]

Loading content...