mirror of
https://github.com/bitwarden/mobile
synced 2025-12-20 10:13:42 +00:00
Use 2 iterations for local password hashing (#1423)
* Add HashPurpose parameter to HashPasswordAsync
* Use 2 iterations for local password hashing
* Force logout if user has old keyHash stored
* Revert "Force logout if user has old keyHash stored"
This reverts commit 497d4928fa.
* Add backwards compatability with existing keyHash
This commit is contained in:
@@ -29,15 +29,7 @@ namespace Bit.App.Services
|
||||
return false;
|
||||
};
|
||||
|
||||
var keyHash = await _cryptoService.HashPasswordAsync(password, null);
|
||||
var storedKeyHash = await _cryptoService.GetKeyHashAsync();
|
||||
|
||||
if (storedKeyHash == null || keyHash == null || storedKeyHash != keyHash)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return await _cryptoService.CompareAndUpdateKeyHashAsync(password, null);
|
||||
};
|
||||
|
||||
return await _platformUtilsService.ShowPasswordDialogAsync(AppResources.PasswordConfirmation, AppResources.PasswordConfirmationDesc, validator);
|
||||
|
||||
Reference in New Issue
Block a user