pub trait StandardPadding { fn standard_padding(&mut self, rem: uint, func: &fn(&[u8])); }
The StandardPadding trait adds a method useful for various hash algorithms to a FixedBuffer struct.
fn standard_padding(&mut self, rem: uint, func: &fn(&[u8]))
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.
impl<T: FixedBuffer> StandardPadding for T
Prefix searches with a type followed by a colon (e.g.
fn:
) to restrict the search to a given type.
Accepted types are: fn
, mod
,
struct
(or str
), enum
,
trait
, typedef
(or
tdef
).