Struct blake2::VarBlake2s [−][src]
pub struct VarBlake2s { /* fields omitted */ }Blake2s instance with a variable output.
Methods
impl VarBlake2s[src]
impl VarBlake2spub fn new_keyed(key: &[u8], output_size: usize) -> Self[src]
pub fn new_keyed(key: &[u8], output_size: usize) -> SelfCreates 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 VarBlake2s[src]
impl Clone for VarBlake2sⓘImportant traits for VarBlake2sfn clone(&self) -> VarBlake2s[src]
fn clone(&self) -> VarBlake2sReturns 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 VarBlake2s[src]
impl Default for VarBlake2simpl BlockInput for VarBlake2s[src]
impl BlockInput for VarBlake2stype BlockSize = U32
impl Input for VarBlake2s[src]
impl Input for VarBlake2sfn 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 VarBlake2s[src]
impl VariableOutput for VarBlake2sfn 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) -> usizeGet 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 VarBlake2s[src]
impl Reset for VarBlake2simpl Debug for VarBlake2s
impl Debug for VarBlake2sfn 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 VarBlake2s
impl Write for VarBlake2sfn 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 Self1.0.0[src]
fn by_ref(&mut self) -> &mut SelfCreates a "by reference" adaptor for this instance of Write. Read more
Auto Trait Implementations
impl Send for VarBlake2s
impl Send for VarBlake2simpl Sync for VarBlake2s
impl Sync for VarBlake2s