예제 #1
0
 public MarginEncryption()
 {
     tf    = new MxoTwofish();
     crc32 = new Crc32();
 }
예제 #2
0
파일: HealthCheck.cs 프로젝트: hdneo/mxo-hd
        private int crcCheck()
        {
            Crc32 crc32 = new Crc32();
            byte[] knownResult={0x0d,0x1e,0xe7,0xea};
            string testString = "this is a test";
            byte[] testArray = StringUtils.stringToBytes(testString);
            // Test is done with a non reversed array
            byte [] result = crc32.checksumB(testArray,0);

            if (!ArrayUtils.equal(knownResult, result))
            {
                Console.Write("Failed\n");
                return 0;
            }
            Output.Write("OK\n");
            return 1;
        }