[][src]Struct cryptoxide::blake2b::Blake2b

pub struct Blake2b { /* fields omitted */ }

Blake2b Context

Methods

impl Blake2b
[src]

pub fn new(outlen: usize) -> Blake2b
[src]

Create a new Blake2b context with a specific output size in bytes

the size need to be between 0 (non included) and 64 bytes (included)

pub fn new_keyed(outlen: usize, key: &[u8]) -> Blake2b
[src]

Similar to new but also takes a variable size key to tweak the context initialization

pub fn reset(&mut self)
[src]

Reset the context to the state after calling new

pub fn blake2b(out: &mut [u8], input: &[u8], key: &[u8])
[src]

Trait Implementations

impl Digest for Blake2b
[src]

fn output_bytes(&self) -> usize
[src]

Get the output size in bytes.

fn input_str(&mut self, input: &str)
[src]

Convenience function that feeds a string into a digest. Read more

fn result_str(&mut self) -> String
[src]

Convenience function that retrieves the result of a digest as a String in hexadecimal format. Read more

impl Mac for Blake2b
[src]

fn input(&mut self, data: &[u8])
[src]

Process input data.

Arguments

  • data - The input data to process.

fn reset(&mut self)
[src]

Reset the Mac state to begin processing another input stream.

fn result(&mut self) -> MacResult
[src]

Obtain the result of a Mac computation as a MacResult.

fn raw_result(&mut self, output: &mut [u8])
[src]

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.

fn output_bytes(&self) -> usize
[src]

Get the size of the Mac code, in bytes.

impl Copy for Blake2b
[src]

impl Clone for Blake2b
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Send for Blake2b

impl Sync for Blake2b

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]