Struct cryptoxide::hashing::blake2b::ContextDyn
source · pub struct ContextDyn { /* private fields */ }
Expand description
Blake2b Context with dynamic output size determined by initial parameter
Implementations§
source§impl ContextDyn
impl ContextDyn
sourcepub fn new(output_bytes: usize) -> Self
pub fn new(output_bytes: usize) -> Self
Create a new Blake2b context with a specific output size in bytes defined by parameter
the size need to be between 0 (non included) and 64 bytes (included)
sourcepub fn new_keyed(output_bytes: usize, key: &[u8]) -> Self
pub fn new_keyed(output_bytes: usize, key: &[u8]) -> Self
Similar to new
but also takes a variable size key
to tweak the context initialization
pub fn update(self, input: &[u8]) -> Self
pub fn update_mut(&mut self, input: &[u8])
pub fn finalize_at(self, out: &mut [u8])
pub fn finalize_reset_at(&mut self, out: &mut [u8])
pub fn finalize_reset_with_key_at(&mut self, key: &[u8], out: &mut [u8])
pub fn reset_with_key(&mut self, key: &[u8])
pub fn output_bits(&self) -> usize
Trait Implementations§
source§impl Clone for ContextDyn
impl Clone for ContextDyn
source§fn clone(&self) -> ContextDyn
fn clone(&self) -> ContextDyn
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more