Trait shaman::cryptoutil::StandardPadding
[−]
[src]
pub trait StandardPadding { fn standard_padding<F: FnMut(&[u8])>(&mut self, rem: usize, func: F); }
The StandardPadding trait adds a method useful for various hash algorithms to a FixedBuffer struct.
Required Methods
fn standard_padding<F: FnMut(&[u8])>(&mut self, rem: usize, func: F)
Add standard padding to the buffer. The buffer must not be full when this method is called and is guaranteed to have exactly rem remaining bytes when it returns. If there are not at least rem bytes available, the buffer will be zero padded, processed, cleared, and then filled with zeros again until only rem bytes are remaining.
Implementors
impl<T: FixedBuffer> StandardPadding for T