示例#1
0
        public void Multigraph_SubstitutionTest()
        {
            Substitution substitution = new Substitution(Utility.KeyedEnglishAlphabet("KRYPTOS").ToStringArray());

            for (int i = 0; i < 25; i++)
            {
                substitution.Key = substitution.ScrambledAlphabet();
                generated        = substitution.GenerateRandomLetters();

                cipher = substitution.Encrypt(generated);
                clear  = substitution.Decrypt(cipher);

                CollectionAssert.AreEqual(generated, clear);
            }
        }