public void TestMethod_GenerateGreatRndNumberUsingCrypto_verify_all_numbers_are_generated()
        {
            int result  = CryptoFunc.GenerateGreatRndNumberUsingCrypto(1, 255);
            var dico    = new Dictionary <int, int>();
            var dicoRef = new Dictionary <int, bool>();

            for (int i = 1; i < 255; i++)
            {
                dicoRef.Add(i, false);
            }

            for (int i = 1; i < 1000; i++)
            {
                result = CryptoFunc.GenerateGreatRndNumberUsingCrypto(1, 254);
                if (dico.ContainsKey(result))
                {
                    dico[result]++;
                }
                else
                {
                    dico.Add(result, 1);
                }

                dicoRef[result] = true;
            }

            Assert.IsTrue(dicoRef.ContainsValue(true));
            //Assert.IsTrue(HaveAllValues(dico)); //bug
        }
        public void TestMethod_RsaDecryption_encryption_not_null()
        {
            const string source = "N06oeaZWoEgD3ktg8lvw2ncecdqE9grb+NRV/QoYpp4VRjQeGiDZYPwFbd4VwhqmAk+7uYeGHc2yd/LCz7j9oN7Z1X6MKxYmiGc7FiL2fobKXcHb1yNpTXgy5jNok6Y02dtJJaUn5GmNMDvk1fYxGgyvCqScxalF16Nl1vAWO7I=";
            string       result = CryptoFunc.RsaDecryption(source);

            Assert.IsNotNull(result);
        }
        public void TestMethod_RsaDecryption_source_is_a_the_same_after_encryption_and_decryption()
        {
            const string source = "A long long time ago in a galaxy far far away";
            string       result = CryptoFunc.RsaDecryption(CryptoFunc.RsaEncryption(source));

            Assert.AreEqual(result, source);
        }
        public void TestMethod_RsaEncryption_encryption_not_null()
        {
            const string source = "A long long time ago in a galaxy far far away";
            string       result = CryptoFunc.RsaEncryption(source);

            Assert.IsNotNull(result);
        }
        public void TestMethod_RsaEncryption_source_and_encryption_are_different()
        {
            const string source = "A long long time ago in a galaxy far far away";
            string       result = CryptoFunc.RsaEncryption(source);

            Assert.AreNotEqual(result, source);
        }
        public void TestMethod_NTLM_15()
        {
            const string source   = "15";
            string       expected = "9716238AEE260F349D51BF2D6924C874";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_13()
        {
            const string source   = "13";
            string       expected = "50EC4E7ABB494E8B7825C5AC93A8E90D";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_11()
        {
            const string source   = "11";
            string       expected = "AE0597DC61A5C66B3A0600C60044C448";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_9()
        {
            const string source   = "9";
            string       expected = "90AD6AB281C4AE016E5A7564C307A7E8";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_7()
        {
            const string source   = "7";
            string       expected = "B3CC27D02C5E59AC39384440FDFFF0FD";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_5()
        {
            const string source   = "5";
            string       expected = "94F23786FE827D0A3C0029DC5EB27A65";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_V()
        {
            const string source   = "V";
            string       expected = "ADC5DF4B1F4A1B2501BBEEF236F5BE92";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_U()
        {
            const string source   = "U";
            string       expected = "E13A473448119D45B179E43C957AFD48";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_T()
        {
            const string source   = "T";
            string       expected = "25E87AB85DA56F330F6349A51F586A16";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_S()
        {
            const string source   = "S";
            string       expected = "A2BC7FF665D2DD44F08DEFE1D2007EE9";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_3()
        {
            const string source   = "3";
            string       expected = "5F18A8499CDD4F43D89424AD39CE9AF7";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_4()
        {
            const string source   = "4";
            string       expected = "E30F7B55215AA69B2920E3715E0392A0";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_W()
        {
            const string source   = "W";
            string       expected = "CBB5D41A63E9A77BB35D603B629992C2";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_6()
        {
            const string source   = "6";
            string       expected = "C7C0F6F33F4E34BC0B595FC942CB6D03";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_X()
        {
            const string source   = "X";
            string       expected = "8434E62CE07803876E2EBDAAF4BCA0CD";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_8()
        {
            const string source   = "8";
            string       expected = "99CE74551BA6BFB12EAC366090E26032";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_Y()
        {
            const string source   = "Y";
            string       expected = "E1D968098AC90CA0036A4957645AB03F";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_10()
        {
            const string source   = "10";
            string       expected = "1BE12A813BF08ED15AFBD3FF3E8EC60B";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_Z()
        {
            const string source   = "Z";
            string       expected = "5D9ECAF62D6D99DDD95F0DA0BE245138";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_12()
        {
            const string source   = "12";
            string       expected = "588FEB889288FB953B5F094D47D1565C";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_0()
        {
            const string source   = "0";
            string       expected = "7BC26760A19FC23E0996DAA99744CA80";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_14()
        {
            const string source   = "14";
            string       expected = "9E68980CECE43DEA1028CA3A775FF5E2";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_1()
        {
            const string source   = "1";
            string       expected = "69943C5E63B4D2C104DBBCC15138B72B";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_16()
        {
            const string source   = "16";
            string       expected = "D9D8610B1BECF6D3D09E1B1D25F1AD6D";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }
        public void TestMethod_NTLM_2()
        {
            const string source   = "2";
            string       expected = "8F33E2EBE5960B8738D98A80363786B0";
            string       result   = CryptoFunc.Ntlm(source);

            Assert.AreEqual(result, expected);
        }