MCPcopy Create free account
hub / github.com/CDSecLab/MJXT / search

Method search

src/main/java/utils/Xor8.java:134–146  ·  view source on GitHub ↗
(long key)

Source from the content-addressed store, hash-verified

132 }
133 }
134 public byte[] search(long key) {
135 long hash = Hash.hash64(key, seed); // x
136 int f = fingerprint(hash);
137 int[] r = new int[3];
138 int[] h = new int[3];
139 r[0] = (int) hash;
140 r[1] = (int) Long.rotateLeft(hash, 21);
141 r[2] = (int) Long.rotateLeft(hash, 42);
142 for (int i = 0; i < 3; i++) {
143 h[i] = Hash.reduce(r[i], blockLength) + i * blockLength;
144 }
145 return tool.Xor(ciphertext[h[0]], tool.Xor(ciphertext[h[1]], ciphertext[h[2]]));
146 }
147
148 private int getHash(long key, long seed, int index) {
149 long r = Long.rotateLeft(Hash.hash64(key, seed), 21 * index);

Callers

nothing calls this directly

Calls 4

hash64Method · 0.95
fingerprintMethod · 0.95
reduceMethod · 0.95
XorMethod · 0.80

Tested by

no test coverage detected