MCPcopy Create free account
hub / github.com/demoth/jake2 / Com_BlockChecksum

Method Com_BlockChecksum

qcommon/src/main/java/jake2/qcommon/MD4.java:294–305  ·  view source on GitHub ↗

Bugfixed, now works prima (RST).

(byte[] buffer, int length)

Source from the content-addressed store, hash-verified

292 * Bugfixed, now works prima (RST).
293 */
294 public static int Com_BlockChecksum(byte[] buffer, int length) {
295
296 int val;
297 MD4 md4 = new MD4();
298
299 md4.engineUpdate(buffer, 0, length);
300 byte data[] = md4.engineDigest();
301 ByteBuffer bb = ByteBuffer.wrap(data);
302 bb.order(ByteOrder.LITTLE_ENDIAN);
303 val = bb.getInt() ^ bb.getInt() ^ bb.getInt() ^ bb.getInt();
304 return val;
305 }
306}

Callers 2

mainMethod · 0.95
CM_LoadMapMethod · 0.95

Calls 3

engineUpdateMethod · 0.95
engineDigestMethod · 0.95
getIntMethod · 0.80

Tested by 1

mainMethod · 0.76