Пример #1
0
        public void TestXorEncryption1()
        {
            // Xor-Password: abc
            // 2.5.343 XORObfuscation
            // key = 20810
            // verifier = 52250
            int verifier = CryptoFunctions.CreateXorVerifier1("abc");
            int key      = CryptoFunctions.CreateXorKey1("abc");

            Assert.AreEqual(20810, key);
            Assert.AreEqual(52250, verifier);

            byte[] xorArrAct = CryptoFunctions.CreateXorArray1("abc");
            byte[] xorArrExp = HexRead.ReadFromString("AC-CC-A4-AB-D6-BA-C3-BA-D6-A3-2B-45-D3-79-29-BB");

            //assertThat(xorArrExp, EqualTo(xorArrAct));
            Assert.That(xorArrExp, Is.EqualTo(xorArrAct));
        }