Beispiel #1
0
        public void Monoalphabetic_EncryptTest()
        {
            //Arrange
            string plain = "abcd";

            //Act
            string cypher = _target.Encrypt(plain);

            //Act
            string actual = _target.Decrypt(cypher);
        }
        public void Ceaser_DecryptTest()
        {
            //Arrange
            string plain  = "meetmeafterthetogaparty";
            string cypher = "phhwphdiwhuwkhwrjdsduwb";

            //Act
            string actual = _target.Decrypt(cypher);

            //Assert
            Assert.AreEqual(plain, actual);
        }
        public void Hill_DecryptTest()
        {
            //Arrange
            string plain  = "paymoremoney";
            string cypher = "lnshdlewmtrw";

            //Act
            string actual = _target.Decrypt(cypher);

            //Assert
            Assert.AreEqual(plain, actual);
        }
        public void RowTransposition_DecryptTest()
        {
            //Arrange
            string plain  = "attackpostponeduntiltwoam";
            string cypher = "ttna aptm tsuo aodw coi* knl* pet* ";

            //Act
            string actual = _target.Decrypt(cypher);

            //Assert
            Assert.AreEqual(plain, actual);
        }
Beispiel #5
0
        public void RailFence_DecryptTest()
        {
            //Arrange
            string plain  = "meetmeafterthegraduationparty*";
            string cypher = "mematrhgautopryetefeterdainat*";

            //Act
            string actual = _target.Decrypt(cypher);

            //Assert
            Assert.AreEqual(plain, actual);
        }
        public void PlayFair_DecryptTest()
        {
            //Arrange
            string plain  = "hidethegoldinthetrexestump";
            string cypher = "bmodzbxdnabekudmuixmmouvif";

            //Act
            string actual = _target.Decrypt(cypher);

            //Assert
            Assert.AreEqual(plain, actual);
        }
        public void Monoalphabetic_EncryptTest()
        {
            //Arrange
            string plain = "abcd";

            //Act
            string cypher = _target.Encrypt(plain);

            //Assert
            Assert.AreNotEqual(cypher, plain);

            //Act
            string actual = _target.Decrypt(cypher);

            //Assert
            Assert.AreEqual(plain, actual);
        }