Struct vonuvoli_scheme::externals::blake2::Blake2s [−][src]
pub struct Blake2s { /* fields omitted */ }
Hash function context.
Methods
impl Blake2s
[src]
impl Blake2s
pub fn new_keyed(k: &[u8], output_size: usize) -> Blake2s
[src]
pub fn new_keyed(k: &[u8], output_size: usize) -> Blake2s
Creates a new hashing context with a key.
Trait Implementations
impl Input for Blake2s
[src]
impl Input for Blake2s
fn process(&mut self, input: &[u8])
[src]
fn process(&mut self, input: &[u8])
Digest input data. This method can be called repeatedly for use with streaming messages. Read more
impl Debug for Blake2s
impl Debug for Blake2s
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Default for Blake2s
[src]
impl Default for Blake2s
impl VariableOutput for Blake2s
[src]
impl VariableOutput for Blake2s
fn new(output_size: usize) -> Result<Blake2s, InvalidLength>
[src]
fn new(output_size: usize) -> Result<Blake2s, InvalidLength>
Create new hasher instance with given output size. Will return Err(InvalidLength)
in case if hasher can not work with the given output size. Will always return an error if output size equals to zero. Read more
fn output_size(&self) -> usize
[src]
fn output_size(&self) -> usize
Get output size of the hasher instance provided to the new
method
fn variable_result(self, buf: &mut [u8]) -> Result<&[u8], InvalidLength>
[src]
fn variable_result(self, buf: &mut [u8]) -> Result<&[u8], InvalidLength>
Retrieve the digest result into provided buffer. Length of the buffer must be equal to output size provided to the new
method, otherwise Err(InvalidLength)
will be returned Read more
impl Clone for Blake2s
[src]
impl Clone for Blake2s
fn clone(&self) -> Blake2s
[src]
fn clone(&self) -> Blake2s
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl BlockInput for Blake2s
[src]
impl BlockInput for Blake2s
impl Mac for Blake2s
[src]
impl Mac for Blake2s
type OutputSize = UInt<UInt<UInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>, B0>, B0>, B0>
fn new(key: &[u8]) -> Result<Blake2s, InvalidKeyLength>
[src]
fn new(key: &[u8]) -> Result<Blake2s, InvalidKeyLength>
Create new MAC instance. DO NOT USE low-entropy keys (e.g. passwords)! Read more
fn input(&mut self, data: &[u8])
[src]
fn input(&mut self, data: &[u8])
Process input data.
fn result(self) -> MacResult<<Blake2s as Mac>::OutputSize>
[src]
fn result(self) -> MacResult<<Blake2s as Mac>::OutputSize>
Obtain the result of a Mac
computation as a MacResult
.
fn verify(self, code: &[u8]) -> Result<(), MacError>
fn verify(self, code: &[u8]) -> Result<(), MacError>
Check if code is correct for the processed input
impl FixedOutput for Blake2s
[src]
impl FixedOutput for Blake2s