pub trait PasswordHashParams: Send + Sync {
// Required methods
fn memory_cost(&self) -> Option<u32>;
fn time_cost(&self) -> Option<u32>;
fn parallelism(&self) -> Option<u32>;
}Expand description
Parameters for a password-hashing KDF.
Required Methods§
Sourcefn memory_cost(&self) -> Option<u32>
fn memory_cost(&self) -> Option<u32>
Memory cost in kibibytes (Argon2, scrypt) or None if not applicable.
Sourcefn time_cost(&self) -> Option<u32>
fn time_cost(&self) -> Option<u32>
Time cost (iterations for PBKDF2/Argon2) or None if not applicable.
Sourcefn parallelism(&self) -> Option<u32>
fn parallelism(&self) -> Option<u32>
Degree of parallelism (Argon2/scrypt) or None if not applicable.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".