예제 #1
0
        public bool Update(Guid id, string name, string password)
        {
            User user = GetById(id);

            if (user != null)
            {
                user._username   = name;
                user._password   = Cryptographer.Encrypt(password);
                _users[user._id] = user;
                Console.WriteLine("Update +");
                return(true);
            }
            return(false);
        }
예제 #2
0
 public User(string username, string password) : this()
 {
     this._username = username;
     this._password = Cryptographer.Encrypt(password);
 }