private bool EqualsdOldPassword() { string encryptedPassword = PasswordEncryption.cryptPwd(OldPassword); if (encryptedPassword.Equals(Password)) { return(true); } else { return(false); } }
public async Task UpdatePersonAsync(Person newPerson) { if (isUserConnected()) { HttpClient client = new HttpClient(); newPerson.Password = PasswordEncryption.cryptPwd(newPerson.Password); var newPersonJSON = Newtonsoft.Json.JsonConvert.SerializeObject(newPerson); HttpContent content = new StringContent(newPersonJSON, Encoding.UTF8, "application/json"); HttpResponseMessage response = await client.PutAsync("http://keyregisterweb.azurewebsites.net/api/people/updatePerson/?email=" + newPerson.Email, content); } else { var loader = new Windows.ApplicationModel.Resources.ResourceLoader(); string str = loader.GetString("noNetwork"); throw new NoNetworkException(str); } }
private string MyCrypt(string password) { string cryptPass = PasswordEncryption.cryptPwd(password); return(cryptPass); }