MCPcopy Index your code
hub / github.com/CDSecLab/MJXT / getHash

Method getHash

src/main/java/utils/Xor8.java:148–153  ·  view source on GitHub ↗
(long key, long seed, int index)

Source from the content-addressed store, hash-verified

146 }
147
148 private int getHash(long key, long seed, int index) {
149 long r = Long.rotateLeft(Hash.hash64(key, seed), 21 * index);
150 r = Hash.reduce((int) r, blockLength);
151 r = r + index * blockLength;
152 return (int) r;
153 }
154
155 private int fingerprint(long hash) {
156 return (int) (hash & ((1 << BITS_PER_FINGERPRINT) - 1));

Callers 1

Xor8Method · 0.95

Calls 2

hash64Method · 0.95
reduceMethod · 0.95

Tested by

no test coverage detected