pub struct Password { /* private fields */ }Expand description
Never printed or serialized, only hashed or checked; kept in NFC, as NIST SP 800-63B asks.
Implementations§
Source§impl Password
impl Password
pub fn parse(typed: String) -> Result<Self>
Sourcepub fn entered(typed: String) -> Self
pub fn entered(typed: String) -> Self
Without the length policy, for checking one already chosen: one chosen under an older policy, or counted before NFC, must still match.
Sourcepub async fn check(&self, hash: Option<&PasswordHash>) -> Result<PasswordCheck>
pub async fn check(&self, hash: Option<&PasswordHash>) -> Result<PasswordCheck>
Without a hash it checks a fixed one, and a non-NFC password both ways always, so an unknown account takes as long.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Password
impl<'de> Deserialize<'de> for Password
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Password
impl RefUnwindSafe for Password
impl Send for Password
impl Sync for Password
impl Unpin for Password
impl UnsafeUnpin for Password
impl UnwindSafe for Password
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