Struct libpasta::config::DEFAULT_CONFIG [−]
pub struct DEFAULT_CONFIG { /* fields omitted */ }
Default configuration set.
Methods from __Deref<Target = Config>
pub fn hash_password(&self, password: &str) -> String
[src]
pub fn hash_password(&self, password: &str) -> String
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.
pub fn verify_password(&self, hash: &str, password: &str) -> bool
[src]
pub fn verify_password(&self, hash: &str, password: &str) -> bool
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]
pub fn verify_password_update_hash(
&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.
pub fn migrate_hash(&self, hash: &str) -> Option<String>
[src]
pub fn migrate_hash(&self, hash: &str) -> Option<String>
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.
pub fn add_key(&self, key: &[u8]) -> String
[src]
pub fn add_key(&self, key: &[u8]) -> String
Add a new key into the list of configured keys
pub fn to_string(&self) -> String
[src]
pub fn to_string(&self) -> String
Serialize the configuration as YAML
Trait Implementations
impl __Deref for DEFAULT_CONFIG
impl __Deref for DEFAULT_CONFIG
type Target = Config
The resulting type after dereferencing.
fn deref(&self) -> &Config
fn deref(&self) -> &Config
Dereferences the value.
impl LazyStatic for DEFAULT_CONFIG
impl LazyStatic for DEFAULT_CONFIG
fn initialize(lazy: &Self)
fn initialize(lazy: &Self)
Auto Trait Implementations
impl Send for DEFAULT_CONFIG
impl Send for DEFAULT_CONFIG
impl Sync for DEFAULT_CONFIG
impl Sync for DEFAULT_CONFIG