[−][src]Struct libpasta::config::DEFAULT_CONFIG
Default configuration set.
Methods from Deref<Target = Config>
#[must_use]pub fn hash_password(&self, password: &str) -> String
[src]
Generates hash for a given password.
Will automatically generate a random salt. In the extreme case that the default source of randomness is unavailable, this will fallback to a seed generated when the library is initialised. An error will be logged when this happens. /// ## Panics A panic indicates a problem with the serialization mechanisms, and should be reported.
#[must_use]pub fn verify_password(&self, hash: &str, password: &str) -> bool
[src]
Verifies the provided password matches the inputted hash string.
If there is any error in processing the hash or password, this
will simply return false
.
pub fn verify_password_update_hash(
&self,
hash: &str,
password: &str
) -> HashUpdate
[src]
&self,
hash: &str,
password: &str
) -> HashUpdate
Verifies a supplied password against a previously computed password hash,
and performs an in-place update of the hash value if the password verifies.
Hence this needs to take a mutable String
reference.
#[must_use]pub fn migrate_hash(&self, hash: &str) -> Option<String>
[src]
Migrate the input hash to the current recommended hash.
Note that this does not require the password. This is for batch updating
of hashes, where the password is not available. This performs an onion
approach, returning new_hash(old_hash)
.
If the password is also available, the verify_password_update_hash
should
instead be used.
#[must_use]pub fn add_key(&self, key: &[u8]) -> String
[src]
Add a new key into the list of configured keys
Trait Implementations
impl Deref for DEFAULT_CONFIG
[src]
impl LazyStatic for DEFAULT_CONFIG
[src]
pub fn initialize(lazy: &Self)
[src]
Auto Trait Implementations
impl RefUnwindSafe for DEFAULT_CONFIG
impl Send for DEFAULT_CONFIG
impl Sync for DEFAULT_CONFIG
impl Unpin for DEFAULT_CONFIG
impl UnwindSafe for DEFAULT_CONFIG
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,