[][src]Trait nettle::hash::Hash

pub trait Hash {
    fn digest_size(&self) -> usize;
fn update(&mut self, data: &[u8]);
fn digest(&mut self, digest: &mut [u8]);
fn box_clone(&self) -> Box<dyn Hash>; }

Hash function.

Cryptographic hash functions compute a fixed length checksum (also called digest) from variable length data.

Required methods

fn digest_size(&self) -> usize

Size of the digest in bytes

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

Writes data into the hash function.

fn digest(&mut self, digest: &mut [u8])

Finalizes the hash function and writes the digest into the provided slice. digest must be at least DIGEST_SIZE bytes large, otherwise the digest will be truncated. Resets the hash function contexts.

fn box_clone(&self) -> Box<dyn Hash>

Clones the hash context into a Box.

Loading content...

Trait Implementations

impl Write for dyn Hash[src]

Implementations on Foreign Types

impl Hash for Box<dyn Hash>[src]

Loading content...

Implementors

impl Hash for GostHash94[src]

impl Hash for Md2[src]

impl Hash for Md4[src]

impl Hash for Md5[src]

impl Hash for Ripemd160[src]

impl Hash for Sha1[src]

impl Hash for Sha3_224[src]

impl Hash for Sha3_256[src]

impl Hash for Sha3_384[src]

impl Hash for Sha3_512[src]

impl Hash for Sha224[src]

impl Hash for Sha256[src]

impl Hash for Sha384[src]

impl Hash for Sha512[src]

impl Hash for Sha512_224[src]

impl Hash for Sha512_256[src]

Loading content...