Home | History | Annotate | Download | only in hash

Lines Matching refs:hashFunction

31       HashFunction hasher = Hashing.goodFastHash(i);
41 private static void assertInvariants(HashFunction hashFunction) {
46 HashCode hashcode1 = hashFunction.newHasher().putObject(o, HashTestUtils.BAD_FUNNEL).hash();
47 HashCode hashcode2 = hashFunction.newHasher().putObject(o, HashTestUtils.BAD_FUNNEL).hash();
49 assertEquals(hashFunction.bits(), hashcode1.bits());
50 assertEquals(hashFunction.bits(), hashcode1.asBytes().length * 8);
55 assertHashBytesThrowsCorrectExceptions(hashFunction);
58 private static void assertHashBytesThrowsCorrectExceptions(HashFunction hashFunction) {
59 hashFunction.hashBytes(new byte[64], 0, 0);
62 hashFunction.hashBytes(new byte[128], -1, 128);
66 hashFunction.hashBytes(new byte[128], 64, 256 /* too long len */);
70 hashFunction.hashBytes(new byte[64], 0, -1);