pub struct PasswordHasherService { /* private fields */ }Expand description
密码哈希器
Implementations§
Source§impl PasswordHasherService
impl PasswordHasherService
Sourcepub fn new(config: PasswordHashConfig) -> Self
pub fn new(config: PasswordHashConfig) -> Self
Sourcepub fn hash_password(&self, password: &str) -> PasswordHashResult<String>
pub fn hash_password(&self, password: &str) -> PasswordHashResult<String>
Sourcepub fn verify_password(
&self,
password: &str,
hash: &str,
) -> PasswordHashResult<bool>
pub fn verify_password( &self, password: &str, hash: &str, ) -> PasswordHashResult<bool>
Trait Implementations§
Source§impl Clone for PasswordHasherService
impl Clone for PasswordHasherService
Source§fn clone(&self) -> PasswordHasherService
fn clone(&self) -> PasswordHasherService
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 PasswordHasherService
impl Debug for PasswordHasherService
Auto Trait Implementations§
impl Freeze for PasswordHasherService
impl RefUnwindSafe for PasswordHasherService
impl Send for PasswordHasherService
impl Sync for PasswordHasherService
impl Unpin for PasswordHasherService
impl UnsafeUnpin for PasswordHasherService
impl UnwindSafe for PasswordHasherService
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