Exemplo n.º 1
0
        public static String[] DecryptString(IEnumerable <String> Input)
        {
            {
                List <String> Dec = new List <String>();

                foreach (String s in Input)
                {
                    String Decrypt = "";

                    foreach (String S2 in s.Split('*'))
                    {
                        for (int i = 0; i < Encryption.Length; i++)
                        {
                            if (S2.Equals(Encryption[i]))
                            {
                                Decrypt += Letters[i];
                            }
                        }
                    }

                    Dec.Add(Decrypt);
                }

                return(Dec.ToArray());
            }
        }
Exemplo n.º 2
0
        public static void DecryptFile(String Path, String Output, bool DeleteEncryptedFile)
        {
            {
                List <String> Contents = new List <String>();

                foreach (String S in File.ReadAllLines(Path))
                {
                    String Decrypt = "";

                    foreach (String S2 in S.Split('*'))
                    {
                        for (int i = 0; i < Encryption.Length; i++)
                        {
                            if (S2.Equals(Encryption[i]))
                            {
                                Decrypt += Letters[i];
                            }
                        }
                    }

                    Contents.Add(Decrypt);
                }

                File.WriteAllLines(Output, Contents.ToArray());

                if (DeleteEncryptedFile)
                {
                    File.Delete(Path);
                }
            }
        }
Exemplo n.º 3
0
        public static String DecryptString(String Input)
        {
            {
                String Decrypt = "";

                foreach (String S2 in Input.Split('*'))
                {
                    for (int i = 0; i < Encryption.Length; i++)
                    {
                        if (S2.Equals(Encryption[i]))
                        {
                            Decrypt += Letters[i];
                        }
                    }
                }

                return(Decrypt);
            }
        }