public override bool VerifyPassword(string password) { lock (accounts) { NEP6Account account = accounts.Values.FirstOrDefault(p => !p.Decrypted); if (account == null) { account = accounts.Values.FirstOrDefault(p => p.HasKey); } if (account == null) { return(true); } if (account.Decrypted) { return(account.VerifyPassword(password)); } else { try { account.GetKey(password); return(true); } catch (FormatException) { return(false); } } } }
public override bool VerifyPassword(string password) { lock (accounts) { NEP6Account account = accounts.Values.FirstOrDefault(p => !p.Decrypted); if (account == null) { account = accounts.Values.FirstOrDefault(p => p.HasKey); } if (account == null) { return(true); } return(account.VerifyPassword(password)); } }