Struct blake2b_simd::blake2bp::Params[][src]

pub struct Params { /* fields omitted */ }
Expand description

A parameter builder for BLAKE2bp, just like the Params type for BLAKE2b.

This builder only supports configuring the hash length and a secret key. This matches the options provided by the reference implementation.

Example

use blake2b_simd::blake2bp;
let mut state = blake2bp::Params::new().hash_length(32).to_state();

Implementations

Equivalent to Params::default().

Hash an input all at once with these parameters.

Construct a BLAKE2bp State object based on these parameters.

Set the length of the final hash, from 1 to OUTBYTES (64). Apart from controlling the length of the final Hash, this is also associated data, and changing it will result in a totally different hash.

Use a secret key, so that BLAKE2bp acts as a MAC. The maximum key length is KEYBYTES (64). An empty key is equivalent to having no key at all.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.