mirror of
https://github.com/bitwarden/mobile
synced 2026-01-10 12:33:28 +00:00
fix password leaked check
This commit is contained in:
@@ -29,7 +29,7 @@ namespace Bit.Core.Services
|
||||
public async Task<int> PasswordLeakedAsync(string password)
|
||||
{
|
||||
var hashBytes = await _cryptoFunctionService.HashAsync(password, Enums.CryptoHashAlgorithm.Sha1);
|
||||
var hash = BitConverter.ToString(hashBytes).ToUpperInvariant();
|
||||
var hash = BitConverter.ToString(hashBytes).Replace("-", string.Empty).ToUpperInvariant();
|
||||
var hashStart = hash.Substring(0, 5);
|
||||
var hashEnding = hash.Substring(5);
|
||||
var response = await _httpClient.GetAsync(string.Concat(PwnedPasswordsApi, hashStart));
|
||||
|
||||
Reference in New Issue
Block a user