Home
last modified time | relevance | path

Searched refs:hashFunction (Results 1 – 17 of 17) sorted by relevance

/external/guava/guava-tests/test/com/google/common/hash/
DHashTestUtils.java58 static void verifyHashFunction(HashFn hashFunction, int hashbits, int expected) { in verifyHashFunction() argument
68 byte[] hash = hashFunction.hash(Arrays.copyOf(key, i), seed); in verifyHashFunction()
73 byte[] result = hashFunction.hash(hashes, 0); in verifyHashFunction()
414 static void assertInvariants(HashFunction hashFunction) { in assertInvariants() argument
419 HashCode hashcode1 = hashFunction.hashObject(o, HashTestUtils.BAD_FUNNEL); in assertInvariants()
420 HashCode hashcode2 = hashFunction.hashObject(o, HashTestUtils.BAD_FUNNEL); in assertInvariants()
422 Assert.assertEquals(hashFunction.bits(), hashcode1.bits()); in assertInvariants()
423 Assert.assertEquals(hashFunction.bits(), hashcode1.asBytes().length * 8); in assertInvariants()
428 assertHashBytesThrowsCorrectExceptions(hashFunction); in assertInvariants()
429 assertIndependentHashers(hashFunction); in assertInvariants()
[all …]
DHashingOutputStreamTest.java32 private HashFunction hashFunction; field in HashingOutputStreamTest
38 hashFunction = EasyMock.createMock(HashFunction.class); in setUp()
40 EasyMock.expect(hashFunction.newHasher()).andReturn(hasher).once(); in setUp()
41 EasyMock.replay(hashFunction); in setUp()
48 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer); in testWrite_putSingleByte()
52 EasyMock.verify(hashFunction); in testWrite_putSingleByte()
60 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer); in testWrite_putByteArray()
64 EasyMock.verify(hashFunction); in testWrite_putByteArray()
72 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer); in testWrite_putByteArrayAtPos()
76 EasyMock.verify(hashFunction); in testWrite_putByteArrayAtPos()
DHashingInputStreamTest.java35 private HashFunction hashFunction; field in HashingInputStreamTest
42 hashFunction = EasyMock.createMock(HashFunction.class); in setUp()
45 EasyMock.expect(hashFunction.newHasher()).andReturn(hasher).once(); in setUp()
46 EasyMock.replay(hashFunction); in setUp()
52 HashingInputStream in = new HashingInputStream(hashFunction, buffer); in testRead_putSingleByte()
57 EasyMock.verify(hashFunction); in testRead_putSingleByte()
65 HashingInputStream in = new HashingInputStream(hashFunction, buffer); in testRead_putByteArray()
74 EasyMock.verify(hashFunction); in testRead_putByteArray()
82 HashingInputStream in = new HashingInputStream(hashFunction, buffer); in testRead_putByteArrayAtPos()
91 EasyMock.verify(hashFunction); in testRead_putByteArrayAtPos()
[all …]
DHashFunctionEnum.java43 private final HashFunction hashFunction; field in HashFunctionEnum
45 private HashFunctionEnum(HashFunction hashFunction) { in HashFunctionEnum() argument
46 this.hashFunction = hashFunction; in HashFunctionEnum()
50 return hashFunction; in getHashFunction()
DHashingTest.java431 HashFunction hashFunction = (HashFunction) method.invoke(Hashing.class); in testAllHashFunctionsHaveKnownHashes() local
432 assertTrue("There should be at least 3 entries in KNOWN_HASHES for " + hashFunction, in testAllHashFunctionsHaveKnownHashes()
433 KNOWN_HASHES.row(hashFunction).size() >= 3); in testAllHashFunctionsHaveKnownHashes()
/external/guava/guava-tests/benchmark/com/google/common/hash/
DHashFunctionBenchmark.java54 @Benchmark int hashFunction(int reps) { in hashFunction() method in HashFunctionBenchmark
55 HashFunction hashFunction = hashFunctionEnum.getHashFunction(); in hashFunction() local
58 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in hashFunction()
DChecksumBenchmark.java85 private byte runHashFunction(int reps, HashFunction hashFunction) { in runHashFunction() argument
91 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in runHashFunction()
/external/guava/guava/src/com/google/common/hash/
DHashingOutputStream.java45 public HashingOutputStream(HashFunction hashFunction, OutputStream out) { in HashingOutputStream() argument
47 this.hasher = checkNotNull(hashFunction.newHasher()); in HashingOutputStream()
DHashingInputStream.java41 public HashingInputStream(HashFunction hashFunction, InputStream in) { in HashingInputStream() argument
43 this.hasher = checkNotNull(hashFunction.newHasher()); in HashingInputStream()
/external/guava/guava/src/com/google/common/io/
DByteSource.java310 public HashCode hash(HashFunction hashFunction) throws IOException { in hash() argument
311 Hasher hasher = hashFunction.newHasher(); in hash()
551 public HashCode hash(HashFunction hashFunction) throws IOException { in hash() argument
552 return hashFunction.hashBytes(bytes); in hash()
DByteStreams.java938 InputSupplier<? extends InputStream> supplier, HashFunction hashFunction)
940 return asByteSource(supplier).hash(hashFunction);
DFiles.java789 public static HashCode hash(File file, HashFunction hashFunction) in hash() argument
791 return asByteSource(file).hash(hashFunction); in hash()
/external/clang/test/Rewriter/
Drewrite-protocol-type-1.m26 @property int (*hashFunction)(const void *item, int (*size)(const void *item));
/external/clang/test/ARCMT/
Dobjcmt-ns-returns-inner-pointer.m128 @property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
Dobjcmt-migrate-all.m129 @property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
Dobjcmt-ns-returns-inner-pointer.m.result128 @property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));
Dobjcmt-migrate-all.m.result129 @property NSUInteger (*hashFunction)(const void *item, NSUInteger (*size)(const void *item));