Struct devolutions_crypto::Argon2Parameters
source · pub struct Argon2Parameters {
pub length: u32,
pub lanes: u32,
pub memory: u32,
pub iterations: u32,
/* private fields */
}Expand description
Parameters used to derive the password into an Argon2 hash. It is used to derive a password into a keypair. You should use the default, although this may be tweakable by the user in some cases. Once serialized, you can save it along the user information as it is not sensitive data. If the hash should never be computed in a non-threaded environment, you can raise the “lanes” value to enable multi-threading.
Note that calling default() will also generate a new random salt,
so two calls to default() will not generate the same structure.
Fields§
§length: u32Length of the desired hash. Should be 32 in most case.
lanes: u32Number of parallel jobs to run. Only use if always computed in a multithreaded environment.
memory: u32Memory used by the algorithm in KiB. Higher is better.
iterations: u32Number of iterations(time cost). Higher is better.
Implementations§
Trait Implementations§
source§impl Clone for Argon2Parameters
impl Clone for Argon2Parameters
source§fn clone(&self) -> Argon2Parameters
fn clone(&self) -> Argon2Parameters
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Default for Argon2Parameters
impl Default for Argon2Parameters
Implements the default parameters.