public static async void AddAccount(Account account, string pass) { account.PasswordKey = CreatePassKey(); await PassUtils.SetPass(account.PasswordKey, pass); AppDB.Insert(account); }
public static async Task AddUser(User user, string pass) { user.PasswordKey = CreatePassKey(); await PassUtils.SetPass(user.PasswordKey, pass); AppDB.Insert(user); }
private async void FillEntries() { applicationEntry.Text = account.Application; loginEntry.Text = account.Login; passEntry.Text = await PassUtils.GetPass(account.PasswordKey); emailEntry.Text = account.Email; }
protected override async void OnAppearing() { if (account == null) { await Navigation.PopAsync(); } applicationLabel.Text = account.Application; loginLabel.Text = account.Login; passLabel.Text = await PassUtils.GetPass(account.PasswordKey); emailLabel.Text = account.Email; }
public static async Task <User> MatchUserWithCredentials(string username, string pass) { List <User> users = AppDB.DB.Table <User>().Where(u => u.Login.Equals(username)).ToList(); if (users.Count > 0) { string storedPass = await PassUtils.GetPass(users[0].PasswordKey); if (pass == storedPass) { return(users[0]); } return(null); } return(null); }
private void PassEntry_TextChanged(object sender, TextChangedEventArgs e) { PassUtils.UpdatePassBars(passGrid.Children, passEntry.Text); }
private void GeneratePassButton_Clicked(object sender, EventArgs e) { passEntry.Text = PassUtils.GetRandomAlphanumericPlusString(App.random.Next(8, 12)); }
public static async void UpdateAccount(Account account, string pass) { await PassUtils.ChangePass(account.PasswordKey, pass); AppDB.Update(account); }
public static string CreatePassKey() { return(PassUtils.CreatePassKey("account", GetNextId())); }
void UpdatePassBars() { PassUtils.UpdatePassBars(passGrid.Children, passEntry.Text); }