Trait octavo_digest::Digest
[−]
[src]
pub trait Digest: Clone {
type OutputBits: Unsigned + ArrayLength<u8>;
type OutputBytes: Unsigned + ArrayLength<u8>;
type BlockSize: Unsigned + ArrayLength<u8>;
fn update<T>(&mut self, input: T) where T: AsRef<[u8]>;
fn result<T>(self, output: T) where T: AsMut<[u8]>;
fn output_bits() -> usize { ... }
fn output_bytes() -> usize { ... }
fn block_size() -> usize { ... }
}Hash function digest definition
Associated Types
type OutputBits: Unsigned + ArrayLength<u8>
Output size in bits
type OutputBytes: Unsigned + ArrayLength<u8>
Output size in bytes
type BlockSize: Unsigned + ArrayLength<u8>
Block size in bytes
Required Methods
fn update<T>(&mut self, input: T) where T: AsRef<[u8]>
Update digest with data.
fn result<T>(self, output: T) where T: AsMut<[u8]>
Write resulting hash into output.
output should be big enough to contain whole output.
Panics
If output length is less than Digest::output_bytes.
Provided Methods
fn output_bits() -> usize
Output size in bits
fn output_bytes() -> usize
Output size in bytes
fn block_size() -> usize
Block size in bytes
Implementors
impl<Size> Digest for Blake2s<Size> where Size: ArrayLength<u8> + Mul<U8> + Clone, Size::Output: ArrayLength<u8>impl<Size> Digest for Blake2b<Size> where Size: ArrayLength<u8> + Mul<U8> + Clone, Size::Output: ArrayLength<u8>impl Digest for Md5impl Digest for Ripemd160impl Digest for Sha1impl Digest for Sha224impl Digest for Sha256impl Digest for Sha384impl Digest for Sha512impl Digest for Sha512224impl Digest for Sha512256impl Digest for Sha224impl Digest for Sha256impl Digest for Sha384impl Digest for Sha512impl Digest for Tigerimpl Digest for Tiger2impl Digest for Whirlpool