Struct blake2::VarBlake2b [−][src]
pub struct VarBlake2b { /* fields omitted */ }
Blake2b instance with a variable output.
Methods
impl VarBlake2b
[src]
impl VarBlake2b
pub fn new_keyed(key: &[u8], output_size: usize) -> Self
[src]
pub fn new_keyed(key: &[u8], output_size: usize) -> Self
Creates a new hashing context with a key.
WARNING! If you plan to use it for variable output MAC, then
make sure to compare codes in constant time! It can be done
for example by using subtle
crate.
Trait Implementations
impl Clone for VarBlake2b
[src]
impl Clone for VarBlake2b
ⓘImportant traits for VarBlake2bfn clone(&self) -> VarBlake2b
[src]
fn clone(&self) -> VarBlake2b
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 Default for VarBlake2b
[src]
impl Default for VarBlake2b
impl BlockInput for VarBlake2b
[src]
impl BlockInput for VarBlake2b
type BlockSize = U64
impl Input for VarBlake2b
[src]
impl Input for VarBlake2b
fn input<B: AsRef<[u8]>>(&mut self, data: B)
[src]
fn input<B: AsRef<[u8]>>(&mut self, data: B)
Digest input data. Read more
fn chain<B>(self, data: B) -> Self where
B: AsRef<[u8]>,
[src]
fn chain<B>(self, data: B) -> Self where
B: AsRef<[u8]>,
Digest input data in a chained manner.
impl VariableOutput for VarBlake2b
[src]
impl VariableOutput for VarBlake2b
fn new(output_size: usize) -> Result<Self, InvalidOutputSize>
[src]
fn new(output_size: usize) -> Result<Self, InvalidOutputSize>
Create new hasher instance with the given output size. 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<F: FnOnce(&[u8])>(self, f: F)
[src]
fn variable_result<F: FnOnce(&[u8])>(self, f: F)
Retrieve result via closure and consume hasher. Read more
fn vec_result(self) -> Vec<u8>
[src]
fn vec_result(self) -> Vec<u8>
Retrieve result into vector and consume hasher.
impl Reset for VarBlake2b
[src]
impl Reset for VarBlake2b
impl Debug for VarBlake2b
impl Debug for VarBlake2b
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 Write for VarBlake2b
impl Write for VarBlake2b
fn write(&mut self, buf: &[u8]) -> Result<usize>
fn write(&mut self, buf: &[u8]) -> Result<usize>
Write a buffer into this object, returning how many bytes were written. Read more
fn flush(&mut self) -> Result<()>
fn flush(&mut self) -> Result<()>
Flush this output stream, ensuring that all intermediately buffered contents reach their destination. Read more
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
1.0.0[src]
fn write_all(&mut self, buf: &[u8]) -> Result<(), Error>
Attempts to write an entire buffer into this write. Read more
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
1.0.0[src]
fn write_fmt(&mut self, fmt: Arguments) -> Result<(), Error>
Writes a formatted string into this writer, returning any error encountered. Read more
ⓘImportant traits for &'a mut Ifn by_ref(&mut self) -> &mut Self
1.0.0[src]
fn by_ref(&mut self) -> &mut Self
Creates a "by reference" adaptor for this instance of Write
. Read more
Auto Trait Implementations
impl Send for VarBlake2b
impl Send for VarBlake2b
impl Sync for VarBlake2b
impl Sync for VarBlake2b