Struct shaman::cryptoutil::FixedBuffer64
[−]
[src]
pub struct FixedBuffer64 { /* fields omitted */ }
A fixed size buffer of 64 bytes useful for cryptographic operations.
Methods
impl FixedBuffer64
[src]
fn new() -> FixedBuffer64
Create a new buffer
Trait Implementations
impl Copy for FixedBuffer64
[src]
impl Clone for FixedBuffer64
[src]
fn clone(&self) -> FixedBuffer64
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl FixedBuffer for FixedBuffer64
[src]
fn input<F: FnMut(&[u8])>(&mut self, input: &[u8], func: F)
Input a vector of bytes. If the buffer becomes full, process it with the provided function and then clear the buffer. Read more
fn reset(&mut self)
Reset the buffer.
fn zero_until(&mut self, idx: usize)
Zero the buffer up until the specified index. The buffer position currently must not be greater than that index. Read more
fn next<'s>(&'s mut self, len: usize) -> &'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. Read more
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 current_buffer<'s>(&'s mut self) -> &'s [u8]
Get the current buffer.
fn position(&self) -> usize
Get the current position of the buffer.
fn remaining(&self) -> usize
Get the number of bytes remaining in the buffer until it is full.
fn size(&self) -> usize
Get the size of the buffer