Struct blake2::Blake2b
[−]
[src]
pub struct Blake2b { /* fields omitted */ }
Hash function context.
Methods
impl Blake2b
[src]
pub fn new_keyed(k: &[u8], output_size: usize) -> Self
[src]
Creates a new hashing context with a key.
Trait Implementations
impl Clone for Blake2b
[src]
fn clone(&self) -> Blake2b
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for Blake2b
[src]
impl BlockInput for Blake2b
[src]
type BlockSize = U64
impl Input for Blake2b
[src]
fn process(&mut self, input: &[u8])
[src]
Digest input data. This method can be called repeatedly for use with streaming messages. Read more
impl FixedOutput for Blake2b
[src]
type OutputSize = U64
fn fixed_result(self) -> GenericArray<u8, U64>
[src]
Retrieve the digest result. This method consumes digest instance.
impl VariableOutput for Blake2b
[src]
fn new(output_size: usize) -> Result<Self, InvalidLength>
[src]
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]
Get output size of the hasher instance provided to the new
method
fn variable_result(self, buf: &mut [u8]) -> Result<&[u8], InvalidLength>
[src]
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 Mac for Blake2b
[src]
type OutputSize = U64
fn new(key: &[u8]) -> Result<Self, InvalidKeyLength>
[src]
Create new MAC instance. DO NOT USE low-entropy keys (e.g. passwords)! Read more
fn input(&mut self, data: &[u8])
[src]
Process input data.
fn result(self) -> MacResult<Self::OutputSize>
[src]
Obtain the result of a Mac
computation as a MacResult
.
fn verify(self, code: &[u8]) -> Result<(), MacError>
[src]
Check if code is correct for the processed input