Struct argon2::ParamsBuilder
source · pub struct ParamsBuilder { /* private fields */ }
Expand description
Builder for Argon2 Params
.
Implementations§
source§impl ParamsBuilder
impl ParamsBuilder
sourcepub fn m_cost(&mut self, m_cost: u32) -> &mut Self
pub fn m_cost(&mut self, m_cost: u32) -> &mut Self
Set memory size, expressed in kibibytes, between 1 and (2^32)-1.
sourcepub fn t_cost(&mut self, t_cost: u32) -> &mut Self
pub fn t_cost(&mut self, t_cost: u32) -> &mut Self
Set number of iterations, between 1 and (2^32)-1.
sourcepub fn p_cost(&mut self, p_cost: u32) -> &mut Self
pub fn p_cost(&mut self, p_cost: u32) -> &mut Self
Set degree of parallelism, between 1 and 255.
sourcepub fn data(&mut self, data: AssociatedData) -> &mut Self
pub fn data(&mut self, data: AssociatedData) -> &mut Self
Set associated data.
sourcepub fn output_len(&mut self, len: usize) -> &mut Self
pub fn output_len(&mut self, len: usize) -> &mut Self
Set length of the output (in bytes).
Trait Implementations§
source§impl Clone for ParamsBuilder
impl Clone for ParamsBuilder
source§fn clone(&self) -> ParamsBuilder
fn clone(&self) -> ParamsBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ParamsBuilder
impl Debug for ParamsBuilder
source§impl Default for ParamsBuilder
impl Default for ParamsBuilder
source§impl PartialEq<ParamsBuilder> for ParamsBuilder
impl PartialEq<ParamsBuilder> for ParamsBuilder
source§fn eq(&self, other: &ParamsBuilder) -> bool
fn eq(&self, other: &ParamsBuilder) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.