static void Main(string[] args) { Console.BackgroundColor = ConsoleColor.White; Console.Clear(); Console.ForegroundColor = ConsoleColor.Magenta; DALClient dal = new DALClient(); List <RegisteredDTO> lst = (List <RegisteredDTO>)dal.GetUsers(CancellationToken.None).Data; foreach (RegisteredDTO item in lst) { string hash = string.Join(":", new string[] { item.LoginUser, "2isaMillau%2016" }); string hashLeft = ""; string hashRight = ""; hashLeft = Convert.ToBase64String(Encoding.UTF8.GetBytes(string.Join(":", hash, item.PwdUser))); item.PwdUser = hashLeft; DALWSR_Result r = dal.SaveUser(item, null, CancellationToken.None); Console.WriteLine(item.PwdUser); } Console.ReadKey(); }