pub struct FixedBuffer64 { priv buffer: [u8, ..64], priv buffer_idx: uint, }
A fixed size buffer of 64 bytes useful for cryptographic operations.
impl FixedBuffer64
fn new() -> FixedBuffer64
Create a new buffer
impl FixedBuffer for FixedBuffer64
fn input(&mut self, input: &[u8], func: &fn(&[u8]))
Input a vector of bytes. If the buffer becomes full, process it with the provided function and then clear the buffer.
fn reset(&mut self)
Reset the buffer.
fn zero_until(&mut self, idx: uint)
Zero the buffer up until the specified index. The buffer position currently must not be greater than that index.
fn next<'s>(&'s mut self, len: uint) -> &'s mut [u8]
Get a slice of the buffer of the specified size. There must be at least that many bytes remaining in the buffer.
fn full_buffer<'s>(&'s mut self) -> &'s [u8]
Get the current buffer. The buffer must already be full. This clears the buffer as well.
fn position(&self) -> uint
Get the current position of the buffer.
fn remaining(&self) -> uint
Get the number of bytes remaining in the buffer until it is full.
fn size(&self) -> uint
Get the size of the buffer
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
).