- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 406 for Hasher (0.19 sec)
-
guava/src/com/google/common/hash/Murmur3_32HashFunction.java
@CanIgnoreReturnValue @Override public Hasher putInt(int i) { update(4, i); return this; } @CanIgnoreReturnValue @Override public Hasher putLong(long l) { update(4, (int) l); update(4, l >>> 32); return this; } @CanIgnoreReturnValue @Override public Hasher putChar(char c) { update(2, c); return this;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 02 13:50:22 UTC 2024 - 11.8K bytes - Viewed (0) -
android/guava/src/com/google/common/hash/HashingOutputStream.java
super(checkNotNull(out)); this.hasher = checkNotNull(hashFunction.newHasher()); } @Override public void write(int b) throws IOException { hasher.putByte((byte) b); out.write(b); } @Override public void write(byte[] bytes, int off, int len) throws IOException { hasher.putBytes(bytes, off, len); out.write(bytes, off, len); } /**
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 11 22:00:03 UTC 2024 - 2.6K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java
* @author Dimitris Andreou */ @Immutable @ElementTypesAreNonnullByDefault abstract class AbstractNonStreamingHashFunction extends AbstractHashFunction { @Override public Hasher newHasher() { return newHasher(32); } @Override public Hasher newHasher(int expectedInputSize) { Preconditions.checkArgument(expectedInputSize >= 0); return new BufferingHasher(expectedInputSize); } @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/src/com/google/common/hash/HashFunction.java
* HashCode} when finished using {@link Hasher#hash}. (See an {@linkplain #newHasher example} of * this.) * * <p>If all you want to hash is a single byte array, string or {@code long} value, there are * convenient shortcut methods defined directly on {@link HashFunction} to make this easier. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 25 18:22:59 UTC 2021 - 10.9K bytes - Viewed (0) -
guava/src/com/google/common/hash/HashFunction.java
* HashCode} when finished using {@link Hasher#hash}. (See an {@linkplain #newHasher example} of * this.) * * <p>If all you want to hash is a single byte array, string or {@code long} value, there are * convenient shortcut methods defined directly on {@link HashFunction} to make this easier. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue May 25 18:22:59 UTC 2021 - 10.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java
// https://github.com/aappleby/smhasher/blob/master/src/main.cpp HashTestUtils.verifyHashFunction(hf, 32, 0xB0F57EE3); } public void testParanoid() { HashFn hf = new HashFn() { @Override public byte[] hash(byte[] input, int seed) { Hasher hasher = murmur3_32(seed).newHasher(); Funnels.byteArrayFunnel().funnel(input, hasher); return hasher.hash().asBytes();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:29:46 UTC 2024 - 8.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/HashingTest.java
} public void testHashIntVsForLoop() { int input = 42; HashCode expected = Hashing.md5().hashInt(input); Hasher hasher = Hashing.md5().newHasher(); for (int i = 0; i < 32; i += 8) { hasher.putByte((byte) (input >> i)); } HashCode actual = hasher.hash(); assertEquals(expected, actual); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 09 17:40:09 UTC 2024 - 26.3K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.5K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/HashFunctionBenchmark.java
@Param HashFunctionEnum hashFunctionEnum; private byte[] testBytes; @BeforeExperiment void setUp() { testBytes = new byte[size]; random.nextBytes(testBytes); } @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]; }
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/MacHashFunctionTest.java
public void testPutAfterHash() { 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();
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 13.8K bytes - Viewed (0)