/external/guava/guava/src/com/google/common/hash/ |
H A D | HashingOutputStream.java | 45 public HashingOutputStream(HashFunction hashFunction, OutputStream out) { argument 47 this.hasher = checkNotNull(hashFunction.newHasher());
|
H A D | HashingInputStream.java | 41 public HashingInputStream(HashFunction hashFunction, InputStream in) { argument 43 this.hasher = checkNotNull(hashFunction.newHasher());
|
/external/guava/guava-tests/benchmark/com/google/common/hash/ |
H A D | ChecksumBenchmark.java | 85 private byte runHashFunction(int reps, HashFunction hashFunction) { argument 91 result ^= hashFunction.hashBytes(testBytes).asBytes()[0];
|
H A D | HashFunctionBenchmark.java | 54 @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 D | HashingOutputStreamTest.java | 32 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 D | HashingInputStreamTest.java | 35 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 D | HashFunctionEnum.java | 43 private final HashFunction hashFunction; field in class:HashFunctionEnum 45 private HashFunctionEnum(HashFunction hashFunction) { argument 46 this.hashFunction = hashFunction; 50 return hashFunction;
|
H A D | HashTestUtils.java | 58 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 D | ByteSource.java | 310 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 D | Files.java | 781 * 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 D | ByteStreams.java | 926 * 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
|