1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-13 06:20:48 -05:00

PM-20532 - Refactor name of input param in ISendPasswordHasher.cs

This commit is contained in:
Jared Snider 2025-06-02 20:02:06 -04:00
parent af934a2bee
commit 553169724b
No known key found for this signature in database
GPG Key ID: A149DDD612516286
2 changed files with 5 additions and 5 deletions

View File

@ -2,6 +2,6 @@
public interface ISendPasswordHasher
{
bool VerifyPasswordHash(string sendPasswordHash, string userSubmittedPasswordHash);
bool VerifyPasswordHash(string sendPasswordHash, string inputPasswordHash);
string HashPasswordHash(string clientHashedPassword);
}

View File

@ -6,15 +6,15 @@ namespace Bit.Core.KeyManagement.Sends;
public class SendPasswordHasher(IPasswordHasher<User> passwordHasher) : ISendPasswordHasher
{
/// <summary>
/// Verifies an existing send password hash against a new user submitted password hash.
/// Verifies an existing send password hash against a new input password hash.
/// </summary>
public bool VerifyPasswordHash(string sendPasswordHash, string userSubmittedPasswordHash)
public bool VerifyPasswordHash(string sendPasswordHash, string inputPasswordHash)
{
if (string.IsNullOrWhiteSpace(sendPasswordHash) || string.IsNullOrWhiteSpace(userSubmittedPasswordHash))
if (string.IsNullOrWhiteSpace(sendPasswordHash) || string.IsNullOrWhiteSpace(inputPasswordHash))
{
return false;
}
var passwordResult = passwordHasher.VerifyHashedPassword(new User(), sendPasswordHash, userSubmittedPasswordHash);
var passwordResult = passwordHasher.VerifyHashedPassword(new User(), sendPasswordHash, inputPasswordHash);
return passwordResult is PasswordVerificationResult.Success or PasswordVerificationResult.SuccessRehashNeeded;
}