Beispiel #1
0
        public void Test1()
        {
            string stringToEncrypt = "micky aguilar";
            string actualResult    = EncryptBinary.StringToBinary(stringToEncrypt);
            string expectedResult  = "01101101011010010110001101101011011110010010000001100001011001110111010101101001011011000110000101110010";

            Assert.AreEqual(expectedResult, actualResult);
        }
        private static void Main(string[] args)
        {
            // Rounding
            RoundingTest.TestValues(.0625);

            // Encryption Section

            Console.WriteLine("Encrypt (Basic Conversion)");
            Console.Write("Enter String To Encrypt: ");
            var stringToEncrypt = Console.ReadLine();

            var binary          = new EncryptBinary();
            var encryptedBinary = binary.Encrypt(stringToEncrypt);

            var encryptBasic   = new EncryptBasic();
            var encryptedBasic = encryptBasic.Basic(stringToEncrypt);

            var encryptWithKey   = new EncryptWithKey();
            var encryptedWithKey = encryptWithKey.WithKey(stringToEncrypt);

            // Close Console
            Console.WriteLine("Press Enter To Close");
            Console.ReadLine();
        }