Searched defs:hashFunction (Results 1 - 11 of 11) sorted by relevance

/external/guava/guava/src/com/google/common/hash/
H A DHashingOutputStream.java45 public HashingOutputStream(HashFunction hashFunction, OutputStream out) { argument
47 this.hasher = checkNotNull(hashFunction.newHasher());
H A DHashingInputStream.java41 public HashingInputStream(HashFunction hashFunction, InputStream in) { argument
43 this.hasher = checkNotNull(hashFunction.newHasher());
/external/guava/guava-tests/benchmark/com/google/common/hash/
H A DChecksumBenchmark.java85 private byte runHashFunction(int reps, HashFunction hashFunction) { argument
91 result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
H A DHashFunctionBenchmark.java54 @Benchmark int hashFunction(int reps) { method in class:HashFunctionBenchmark
55 HashFunction hashFunction = hashFunctionEnum.getHashFunction();
58 result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
/external/guava/guava-tests/test/com/google/common/hash/
H A DHashingOutputStreamTest.java32 private HashFunction hashFunction; field in class:HashingOutputStreamTest
38 hashFunction = EasyMock.createMock(HashFunction.class);
40 EasyMock.expect(hashFunction.newHasher()).andReturn(hasher).once();
41 EasyMock.replay(hashFunction);
48 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer);
52 EasyMock.verify(hashFunction);
60 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer);
64 EasyMock.verify(hashFunction);
72 HashingOutputStream out = new HashingOutputStream(hashFunction, buffer);
76 EasyMock.verify(hashFunction);
[all...]
H A DHashingInputStreamTest.java35 private HashFunction hashFunction; field in class:HashingInputStreamTest
42 hashFunction = EasyMock.createMock(HashFunction.class);
45 EasyMock.expect(hashFunction.newHasher()).andReturn(hasher).once();
46 EasyMock.replay(hashFunction);
52 HashingInputStream in = new HashingInputStream(hashFunction, buffer);
57 EasyMock.verify(hashFunction);
65 HashingInputStream in = new HashingInputStream(hashFunction, buffer);
74 EasyMock.verify(hashFunction);
82 HashingInputStream in = new HashingInputStream(hashFunction, buffer);
91 EasyMock.verify(hashFunction);
[all...]
H A DHashFunctionEnum.java43 private final HashFunction hashFunction; field in class:HashFunctionEnum
45 private HashFunctionEnum(HashFunction hashFunction) { argument
46 this.hashFunction = hashFunction;
50 return hashFunction;
H A DHashTestUtils.java58 static void verifyHashFunction(HashFn hashFunction, int hashbits, int expected) { argument
68 byte[] hash = hashFunction.hash(Arrays.copyOf(key, i), seed);
73 byte[] result = hashFunction.hash(hashes, 0);
414 static void assertInvariants(HashFunction hashFunction) { argument
419 HashCode hashcode1 = hashFunction.hashObject(o, HashTestUtils.BAD_FUNNEL);
420 HashCode hashcode2 = hashFunction.hashObject(o, HashTestUtils.BAD_FUNNEL);
422 Assert.assertEquals(hashFunction.bits(), hashcode1.bits());
423 Assert.assertEquals(hashFunction.bits(), hashcode1.asBytes().length * 8);
428 assertHashBytesThrowsCorrectExceptions(hashFunction);
429 assertIndependentHashers(hashFunction);
433 assertHashBytesThrowsCorrectExceptions(HashFunction hashFunction) argument
450 assertIndependentHashers(HashFunction hashFunction) argument
470 randomHash(HashFunction hashFunction, Random random, int numActions) argument
478 assertShortcutsAreEquivalent(HashFunction hashFunction, int trials) argument
489 assertHashBytesEquivalence(HashFunction hashFunction, Random random) argument
501 assertHashIntEquivalence(HashFunction hashFunction, Random random) argument
507 assertHashLongEquivalence(HashFunction hashFunction, Random random) argument
521 assertHashStringEquivalence(HashFunction hashFunction, Random random) argument
553 assertHashStringWithSurrogatesEquivalence( HashFunction hashFunction, Random random) argument
[all...]
/external/guava/guava/src/com/google/common/io/
H A DByteSource.java310 public HashCode hash(HashFunction hashFunction) throws IOException { argument
311 Hasher hasher = hashFunction.newHasher();
551 public HashCode hash(HashFunction hashFunction) throws IOException { argument
552 return hashFunction.hashBytes(bytes);
H A DFiles.java781 * Computes the hash code of the {@code file} using {@code hashFunction}.
784 * @param hashFunction the hash function to use to hash the data
789 public static HashCode hash(File file, HashFunction hashFunction) argument
791 return asByteSource(file).hash(hashFunction);
H A DByteStreams.java926 * hashFunction}.
929 * @param hashFunction the hash function to use to hash the data
938 InputSupplier<? extends InputStream> supplier, HashFunction hashFunction)
940 return asByteSource(supplier).hash(hashFunction);
937 hash( InputSupplier<? extends InputStream> supplier, HashFunction hashFunction) argument

Completed in 119 milliseconds