static void Main(string[] args) { Cezar cezar = new Cezar(); CifruN cifrun = new CifruN(); SubstitutieMonoAlfabetica substitutieMonoAlfabetica = new SubstitutieMonoAlfabetica(); Console.WriteLine(cezar.Encriptare("IMPOSSIBLE IS NOTHING")); Console.WriteLine(cezar.Decriptare("LPSRVVLEOH LV QRWKLQJ")); Console.WriteLine(cifrun.Decriptare("LPSRVVLEOH LV QRWKLQJ")); Console.WriteLine(cifrun.Decriptare("JAJW YWNJI JAJW KFNQJI ST RFYYJW YWD FLFNS KFNQ FLFNS KFNQ GJYYJW")); Console.WriteLine("==============================="); Console.WriteLine(substitutieMonoAlfabetica.Encriptare("ABCD EFGHI JKL")); string text = File.ReadAllText(@"C:\Users\Dragos\source\repos\Criptografie1\Criptografie1\text.txt"); // Console.WriteLine(substitutieMonoAlfabetica.Decriptare(text)); }
static void Main(string[] args) { Cezar cezar = new Cezar(); Console.WriteLine("Criptare prin cifrul lui Cezar:"); Console.WriteLine(cezar.criptat); Console.WriteLine(); string decriptat = cezar.Decriptare(cezar.criptat); Console.WriteLine(decriptat); Console.WriteLine(); Console.Write("n="); CezarGeneralizat cezarGeneralizat = new CezarGeneralizat(); Console.WriteLine("Criptare prin cifrul lui Cezar generalizat:"); Console.WriteLine(cezarGeneralizat.criptat); Console.WriteLine(); Console.WriteLine(cezarGeneralizat.Decriptare(cezarGeneralizat.criptat, cezarGeneralizat.n)); Console.WriteLine(); ROT13 rot13 = new ROT13(); Console.WriteLine("Criptare prin ROT13:"); Console.WriteLine(rot13.criptat); Console.WriteLine(); Console.WriteLine(rot13.Decriptare(rot13.criptat)); Console.WriteLine(); Console.WriteLine("Criptarea prin cheie:"); Console.Write("Introduceti un cuvant cheie: "); Substitutie sub = new Substitutie(); Console.WriteLine(sub.criptat); }