Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 public void DisplayPassword()
 {
     Console.WriteLine($"Password {this._username} - {Cryptographer.Decrypt(this._password)}");
 }
Ejemplo n.º 3
0
 public User(string username, string password) : this()
 {
     this._username = username;
     this._password = Cryptographer.Encrypt(password);
 }