public static void Test(string s) { MD4 md4 = new MD4(); md4.EngineUpdate(s.GetBytes(), 0, s.Length); System.Diagnostics.Debug.WriteLine("\\\"" + s + "\\\""); System.out_renamed.Print(Lib.HexDump(md4.EngineDigest(), 16, false)); }
public static int Com_BlockChecksum(byte[] buffer, int length) { int val; MD4 md4 = new MD4(); md4.EngineUpdate(buffer, 0, length); byte[] data = md4.EngineDigest(); ByteBuffer bb = ByteBuffer.Wrap(data); bb.Order = ByteOrder.LittleEndian; val = bb.GetInt32() ^ bb.GetInt32() ^ bb.GetInt32() ^ bb.GetInt32(); return(val); }