Trait nettle::hash::Hash [−][src]
Hash function.
Cryptographic hash functions compute a fixed length checksum (also called digest) from variable length data.
Required methods
fn digest_size(&self) -> usize
[src]
Size of the digest in bytes
fn update(&mut self, data: &[u8])
[src]
Writes data into the hash function.
fn digest(&mut self, digest: &mut [u8])
[src]
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>
[src]
Clones the hash context into a Box.
Trait Implementations
impl Write for dyn Hash
[src]
fn write(&mut self, buf: &[u8]) -> Result<usize>
[src]
fn flush(&mut self) -> Result<()>
[src]
pub fn write_vectored(&mut self, bufs: &[IoSlice<'_>]) -> Result<usize, Error>
1.36.0[src]
pub fn is_write_vectored(&self) -> bool
[src]
pub fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
pub fn write_all_vectored(
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>
[src]
&mut self,
bufs: &mut [IoSlice<'_>]
) -> Result<(), Error>