- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 41 for newHasher (0.14 sec)
-
guava-tests/test/com/google/common/hash/SipHashFunctionTest.java
assertEquals(expected, SIP_WITH_KEY.hashString(input, UTF_8).asLong()); assertEquals(expected, SIP_WITH_KEY.newHasher().putString(input, UTF_8).hash().asLong()); assertEquals(expected, SIP_WITHOUT_KEY.hashString(input, UTF_8).asLong()); assertEquals(expected, SIP_WITHOUT_KEY.newHasher().putString(input, UTF_8).hash().asLong()); } private static void assertSip(byte[] input, long expected) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 6.6K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashTestUtils.java
hashFunction.hashUnencodedChars("abc"), hashFunction.newHasher().putUnencodedChars("abc").hash(), hashFunction.newHasher().putUnencodedChars("ab").putUnencodedChars("c").hash(), hashFunction.newHasher().putUnencodedChars("a").putUnencodedChars("bc").hash(), hashFunction .newHasher() .putUnencodedChars("a") .putUnencodedChars("b")
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 25.5K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java
* the hash computation done using {@linkplain #newHasher()} are delegated to the {@linkplain * #hashBytes(byte[], int, int)} method. * * @author Dimitris Andreou */ @Immutable @ElementTypesAreNonnullByDefault abstract class AbstractNonStreamingHashFunction extends AbstractHashFunction { @Override public Hasher newHasher() { return newHasher(32); } @Override
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Apr 20 18:43:59 UTC 2021 - 3.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java
hashFunction = mock(HashFunction.class); when(hashFunction.newHasher()).thenReturn(hasher); } public void testWrite_putSingleByte() throws Exception { int b = 'q'; HashingOutputStream out = new HashingOutputStream(hashFunction, buffer); out.write(b); verify(hashFunction).newHasher(); verify(hasher).putByte((byte) b); verifyNoMoreInteractions(hashFunction, hasher); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 11 22:00:03 UTC 2024 - 3.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/HashingInputStreamTest.java
buffer = new ByteArrayInputStream(testBytes); when(hashFunction.newHasher()).thenReturn(hasher); } public void testRead_putSingleByte() throws Exception { HashingInputStream in = new HashingInputStream(hashFunction, buffer); int b = in.read(); assertEquals('y', b); verify(hasher).putByte((byte) 'y'); verify(hashFunction).newHasher(); verifyNoMoreInteractions(hashFunction, hasher); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 02 16:24:50 UTC 2020 - 5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingInputStreamTest.java
buffer = new ByteArrayInputStream(testBytes); when(hashFunction.newHasher()).thenReturn(hasher); } public void testRead_putSingleByte() throws Exception { HashingInputStream in = new HashingInputStream(hashFunction, buffer); int b = in.read(); assertEquals('y', b); verify(hasher).putByte((byte) 'y'); verify(hashFunction).newHasher(); verifyNoMoreInteractions(hashFunction, hasher); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 02 16:24:50 UTC 2020 - 5K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractCompositeHashFunction.java
/* protected */ abstract HashCode makeHash(Hasher[] hashers); @Override public Hasher newHasher() { Hasher[] hashers = new Hasher[functions.length]; for (int i = 0; i < hashers.length; i++) { hashers[i] = functions[i].newHasher(); } return fromHashers(hashers); } @Override public Hasher newHasher(int expectedInputSize) { checkArgument(expectedInputSize >= 0);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Oct 06 00:47:57 UTC 2021 - 5.4K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java
} @Benchmark int hasher(int reps) { HashFunction hashFunction = hashFunctionEnum.getHashFunction(); int result = 37; for (int i = 0; i < reps; i++) { result ^= hashFunction.newHasher().putBytes(testBytes).hash().asBytes()[0]; } return result; } @Benchmark int hashFunction(int reps) { HashFunction hashFunction = hashFunctionEnum.getHashFunction(); int result = 37;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 2.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java
Hasher sha1 = Hashing.sha1().newHasher(); assertEquals( "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12", sha1.putString("The quick brown fox jumps over the lazy dog", UTF_8).hash().toString()); assertThrows(IllegalStateException.class, () -> sha1.putInt(42)); } public void testHashTwice() { Hasher sha1 = Hashing.sha1().newHasher(); assertEquals(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 4.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/MacHashFunctionTest.java
Hasher hasher = Hashing.hmacMd5(MD5_KEY).newHasher(); assertEquals( "9753980fe94daa8ecaa82216519393a9", hasher.putString("The quick brown fox jumps over the lazy dog", UTF_8).hash().toString()); assertThrows(IllegalStateException.class, () -> hasher.putInt(42)); } public void testHashTwice() { Hasher hasher = Hashing.hmacMd5(MD5_KEY).newHasher(); assertEquals(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 13.8K bytes - Viewed (0)