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 Md5
impl Digest for Ripemd160
impl Digest for Sha1
impl Digest for Sha224
impl Digest for Sha256
impl Digest for Sha384
impl Digest for Sha512
impl Digest for Sha512224
impl Digest for Sha512256
impl Digest for Sha224
impl Digest for Sha256
impl Digest for Sha384
impl Digest for Sha512
impl Digest for Tiger
impl Digest for Tiger2
impl Digest for Whirlpool