Skip to main content

PasswordHashParams

Trait PasswordHashParams 

Source
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§

Source

fn memory_cost(&self) -> Option<u32>

Memory cost in kibibytes (Argon2, scrypt) or None if not applicable.

Source

fn time_cost(&self) -> Option<u32>

Time cost (iterations for PBKDF2/Argon2) or None if not applicable.

Source

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".

Implementors§