Exemplo n.º 1
0
        public void GenerateText(IEnumerable <string> keys, string password, out string text)
        {
            SecurityKeyGenerator securityKeyGenerator = new SecurityKeyGenerator();

            text = securityKeyGenerator.GenerateTextFromKeys(keys.Select(x => new SecurityKey()
            {
                Key = x
            }), password);
        }
Exemplo n.º 2
0
        public void GenerateText(IEnumerable <string> keys, string password)
        {
            SecurityKeyGenerator securityKeyGenerator = new SecurityKeyGenerator();

            try
            {
                string text = securityKeyGenerator.GenerateTextFromKeys(keys.Select(x => new SecurityKey()
                {
                    Key = x
                }), password);
                Console.WriteLine("Your Text :");
                Console.WriteLine(Environment.NewLine);
                Console.WriteLine(text);
            }
            catch (Exception)
            {
                Console.WriteLine("Error in Decrypting the Keys");
            }
        }