mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
rename password-related utils functions
This commit is contained in:
parent
aa4cd8b1e1
commit
71f3d84115
5 changed files with 7 additions and 7 deletions
|
|
@ -71,8 +71,8 @@ pub(crate) fn random_string(length: usize) -> String {
|
|||
.collect()
|
||||
}
|
||||
|
||||
/// Calculate a new hash for the given password
|
||||
pub(crate) fn calculate_password_hash<B>(
|
||||
/// Hash the given password
|
||||
pub(crate) fn hash_password<B>(
|
||||
password: B,
|
||||
) -> Result<password_hash::PasswordHashString, password_hash::Error>
|
||||
where
|
||||
|
|
@ -89,7 +89,7 @@ where
|
|||
/// Compare a password to a hash
|
||||
///
|
||||
/// Returns `true` if the password matches the hash, `false` otherwise.
|
||||
pub(crate) fn verify_password_hash<S, B>(hash: S, password: B) -> bool
|
||||
pub(crate) fn verify_password<S, B>(hash: S, password: B) -> bool
|
||||
where
|
||||
S: AsRef<str>,
|
||||
B: AsRef<[u8]>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue