Struct keynesis::hash::Blake2s [−]
pub struct Blake2s { /* fields omitted */ }
Expand description
Blake2s Context
Implementations
impl Blake2s
impl Blake2s
Create a new Blake2s context with a specific output size in bytes
the size need to be between 0 (non included) and 32 bytes (included)
Similar to new
but also takes a variable size key
to tweak the context initialization
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset the context to the state after calling new
pub fn reset_with_key(&mut self, key: &[u8])
Trait Implementations
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset the digest. This method must be called after result() and before supplying more data. Read more
Retrieve the digest result. This method may be called multiple times. Read more
pub fn output_bits(&self) -> usize
pub fn output_bits(&self) -> usize
Get the output size in bits.
pub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
Get the block size in bytes.
fn output_bytes(&self) -> usize
fn output_bytes(&self) -> usize
Get the output size in bytes.
Convenience function that feeds a string into a digest. Read more
fn result_str(&mut self) -> String
fn result_str(&mut self) -> String
Convenience function that retrieves the result of a digest as a String in hexadecimal format. Read more
impl Mac for Blake2s
impl Mac for Blake2s
pub fn reset(&mut self)
pub fn reset(&mut self)
Reset the Mac state to begin processing another input stream.
pub fn result(&mut self) -> MacResult
pub fn result(&mut self) -> MacResult
Obtain the result of a Mac computation as a MacResult.
pub fn raw_result(&mut self, output: &mut [u8])
pub fn raw_result(&mut self, output: &mut [u8])
Obtain the result of a Mac computation as u8. This method should be used very carefully since incorrect use of the Mac code could result in permitting a timing attack which defeats the security provided by a Mac function.
pub fn output_bytes(&self) -> usize
pub fn output_bytes(&self) -> usize
Get the size of the Mac code, in bytes.
Auto Trait Implementations
impl RefUnwindSafe for Blake2s
impl UnwindSafe for Blake2s
Blanket Implementations
Mutably borrows from an owned value. Read more