Struct kanidm_lib_crypto::Password
source · pub struct Password { /* private fields */ }
Implementations§
source§impl Password
impl Password
pub fn new_pbkdf2( policy: &CryptoPolicy, cleartext: &str, ) -> Result<Self, CryptoError>
pub fn new_argon2id( policy: &CryptoPolicy, cleartext: &str, ) -> Result<Self, CryptoError>
pub fn new_argon2id_hsm( policy: &CryptoPolicy, cleartext: &str, hsm: &mut dyn Tpm, hmac_key: &HmacKey, ) -> Result<Self, CryptoError>
pub fn new(policy: &CryptoPolicy, cleartext: &str) -> Result<Self, CryptoError>
pub fn verify(&self, cleartext: &str) -> Result<bool, CryptoError>
pub fn verify_ctx( &self, cleartext: &str, hsm: Option<(&mut dyn Tpm, &HmacKey)>, ) -> Result<bool, CryptoError>
pub fn to_dbpasswordv1(&self) -> DbPasswordV1
pub fn to_repl_v1(&self) -> ReplPasswordV1
pub fn requires_upgrade(&self) -> bool
Trait Implementations§
source§impl TryFrom<&ReplPasswordV1> for Password
impl TryFrom<&ReplPasswordV1> for Password
source§impl TryFrom<DbPasswordV1> for Password
impl TryFrom<DbPasswordV1> for Password
impl StructuralPartialEq for Password
Auto Trait Implementations§
impl Freeze for Password
impl RefUnwindSafe for Password
impl Send for Password
impl Sync for Password
impl Unpin for Password
impl UnwindSafe for Password
Blanket Implementations§
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)