Struct argon2::ParamsBuilder
source · [−]pub struct ParamsBuilder { /* private fields */ }
Expand description
Builder for Argon2 Params
.
Implementations
sourceimpl ParamsBuilder
impl ParamsBuilder
sourcepub fn m_cost(&mut self, m_cost: u32) -> Result<&mut Self>
pub fn m_cost(&mut self, m_cost: u32) -> Result<&mut Self>
Set memory size, expressed in kilobytes, between 1 and (2^32)-1.
sourcepub fn t_cost(&mut self, t_cost: u32) -> Result<&mut Self>
pub fn t_cost(&mut self, t_cost: u32) -> Result<&mut Self>
Set number of iterations, between 1 and (2^32)-1.
sourcepub fn p_cost(&mut self, p_cost: u32) -> Result<&mut Self>
pub fn p_cost(&mut self, p_cost: u32) -> Result<&mut Self>
Set degree of parallelism, between 1 and 255.
sourcepub fn keyid(&mut self, keyid: &[u8]) -> Result<&mut Self>
pub fn keyid(&mut self, keyid: &[u8]) -> Result<&mut Self>
Set key identifier.
Must be 8-bytes or less.
sourcepub fn data(&mut self, bytes: &[u8]) -> Result<&mut Self>
pub fn data(&mut self, bytes: &[u8]) -> Result<&mut Self>
Set associated data.
Must be 32-bytes or less.
sourcepub fn output_len(&mut self, len: usize) -> Result<&mut Self>
pub fn output_len(&mut self, len: usize) -> Result<&mut Self>
Set length of the output (in bytes).
Trait Implementations
sourceimpl Clone for ParamsBuilder
impl Clone for ParamsBuilder
sourcefn clone(&self) -> ParamsBuilder
fn clone(&self) -> ParamsBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ParamsBuilder
impl Debug for ParamsBuilder
sourceimpl Default for ParamsBuilder
impl Default for ParamsBuilder
sourcefn default() -> ParamsBuilder
fn default() -> ParamsBuilder
Returns the “default value” for a type. Read more
sourceimpl PartialEq<ParamsBuilder> for ParamsBuilder
impl PartialEq<ParamsBuilder> for ParamsBuilder
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &ParamsBuilder) -> bool
fn ne(&self, other: &ParamsBuilder) -> bool
This method tests for !=
.
sourceimpl TryFrom<ParamsBuilder> for Params
impl TryFrom<ParamsBuilder> for Params
impl Eq for ParamsBuilder
impl StructuralEq for ParamsBuilder
impl StructuralPartialEq for ParamsBuilder
Auto Trait Implementations
impl RefUnwindSafe for ParamsBuilder
impl Send for ParamsBuilder
impl Sync for ParamsBuilder
impl Unpin for ParamsBuilder
impl UnwindSafe for ParamsBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more