Exemplo n.º 1
0
        public static void GenerateSecurePassword(IInputHandler inputHandler)
        {
            var password = inputHandler.PromptPassword();

            IEncryptionHandler encryptor = new EncryptionHandler();

            Console.WriteLine("Your encrypted password is:");
            Console.WriteLine(encryptor.EncryptPassword(password));
            Console.WriteLine();
        }
Exemplo n.º 2
0
        private void EncryptPassword(ref IUser user)
        {
            IEncryptionHandler encrypter = new EncryptionHandler();

            user.Password = encrypter.EncryptPassword(user.Password);
        }