pub struct PasswordHashConfig {
pub algorithm: PasswordHashAlgorithm,
pub bcrypt_cost: u32,
}Expand description
密码哈希配置
Fields§
§algorithm: PasswordHashAlgorithm使用的哈希算法
bcrypt_cost: u32bcrypt 成本因子(4-31,推荐 12)
Implementations§
Source§impl PasswordHashConfig
impl PasswordHashConfig
Sourcepub fn new(algorithm: PasswordHashAlgorithm) -> Self
pub fn new(algorithm: PasswordHashAlgorithm) -> Self
Sourcepub fn with_bcrypt_cost(self, cost: u32) -> Self
pub fn with_bcrypt_cost(self, cost: u32) -> Self
Trait Implementations§
Source§impl Clone for PasswordHashConfig
impl Clone for PasswordHashConfig
Source§fn clone(&self) -> PasswordHashConfig
fn clone(&self) -> PasswordHashConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PasswordHashConfig
impl Debug for PasswordHashConfig
Auto Trait Implementations§
impl Freeze for PasswordHashConfig
impl RefUnwindSafe for PasswordHashConfig
impl Send for PasswordHashConfig
impl Sync for PasswordHashConfig
impl Unpin for PasswordHashConfig
impl UnsafeUnpin for PasswordHashConfig
impl UnwindSafe for PasswordHashConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more