pub struct Config { /* private fields */ }
Expand description
Password hash configuration parameters. Provides reasonable default
values with Config::default()
, Config::interactive()
,
Config::moderate()
, and Config::sensitive()
.
Implementations§
source§impl Config
impl Config
sourcepub fn with_salt_length(self, salt_length: usize) -> Self
pub fn with_salt_length(self, salt_length: usize) -> Self
Returns this config with salt_length
.
sourcepub fn with_hash_length(self, hash_length: usize) -> Self
pub fn with_hash_length(self, hash_length: usize) -> Self
Returns this config with hash_length
.
sourcepub fn with_memlimit(self, memlimit: usize) -> Self
pub fn with_memlimit(self, memlimit: usize) -> Self
Returns this config with memlimit
.
sourcepub fn with_opslimit(self, opslimit: u64) -> Self
pub fn with_opslimit(self, opslimit: u64) -> Self
Returns this config with opslimit
.
sourcepub fn interactive() -> Self
pub fn interactive() -> Self
Provides a password hash configuration for interactive hashing.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more