public MarginEncryption() { tf = new MxoTwofish(); crc32 = new Crc32(); }
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; }