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()); } }
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); } } }
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); } }