public async Task Modify() { var user = await m_Repository.GetUserAsync(CurrentSession.Id); bool result = HashingHelper.HashUsingPbkdf2(OldPassword, user.Email).Equals(user.Password); CheckError("Ancien mot de passe", "L'ancien mot de passe ne correspond pas !", false); if (result == true && UserPassword.IsValid()) { user.Password = HashingHelper.HashUsingPbkdf2(NewPassword, user.Email); user.Token = Guid.NewGuid(); await m_Repository.SaveAsync(); Clear(); } }