- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for HashTestUtils (0.06 sec)
-
guava-tests/test/com/google/common/hash/HashTestUtils.java
import org.junit.Assert; /** * Various utilities for testing {@link HashFunction}s. * * @author Dimitris Andreou * @author Kurt Alfred Kluever */ @NullUnmarked final class HashTestUtils { private HashTestUtils() {} /** Converts a string, which should contain only ascii-representable characters, to a byte[]. */ static byte[] ascii(String string) { byte[] bytes = new byte[string.length()];Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:19:59 UTC 2025 - 25.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/HashTestUtils.java
import org.junit.Assert; /** * Various utilities for testing {@link HashFunction}s. * * @author Dimitris Andreou * @author Kurt Alfred Kluever */ @NullUnmarked final class HashTestUtils { private HashTestUtils() {} /** Converts a string, which should contain only ascii-representable characters, to a byte[]. */ static byte[] ascii(String string) { byte[] bytes = new byte[string.length()];Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:19:59 UTC 2025 - 25.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java
assertPutString( new char[] { HashTestUtils.randomLowSurrogate(new Random()), HashTestUtils.randomHighSurrogate(new Random()) }); } public void testPutStringWithHighLowSurrogate() { assertPutString( new char[] { HashTestUtils.randomHighSurrogate(new Random()), HashTestUtils.randomLowSurrogate(new Random()) }); }
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 4.5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/ChecksumHashFunctionTest.java
assertHash32(0x5BD90FD9, ADLER_32, "The quick brown fox jumps over the lazy cog"); } private static void assertChecksum(ImmutableSupplier<Checksum> supplier, String input) { byte[] bytes = HashTestUtils.ascii(input); Checksum checksum = supplier.get(); checksum.update(bytes, 0, bytes.length); long value = checksum.getValue(); String toString = "name";
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 3.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java
.build(); public void testHashing() { for (String stringToTest : INPUTS) { for (String algorithmToTest : ALGORITHMS.keySet()) { assertMessageDigestHashing(HashTestUtils.ascii(stringToTest), algorithmToTest); } } } public void testPutAfterHash() { Hasher sha1 = Hashing.sha1().newHasher(); assertEquals(
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Thu Dec 19 18:03:30 UTC 2024 - 4.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/BloomFilterTest.java
public void testBasic() { for (double fpr = 0.0000001; fpr < 0.1; fpr *= 10) { for (int expectedInsertions = 1; expectedInsertions <= 10000; expectedInsertions *= 10) { checkSanity(BloomFilter.create(HashTestUtils.BAD_FUNNEL, expectedInsertions, fpr)); } } } public void testPreconditions() { assertThrows( IllegalArgumentException.class,
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:19:59 UTC 2025 - 22.1K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java
import static java.nio.charset.StandardCharsets.UTF_16LE; import static org.junit.Assert.assertThrows; import com.google.common.collect.Iterables; import com.google.common.hash.HashTestUtils.RandomHasherAction; import java.io.ByteArrayOutputStream; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections;
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Tue Oct 28 18:19:59 UTC 2025 - 8.6K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/MacHashFunctionTest.java
String algorithm = cell.getRowKey(); SecretKey key = cell.getColumnKey(); HashFunction hashFunc = cell.getValue(); assertMacHashing(HashTestUtils.ascii(stringToTest), algorithm, key, hashFunc); } } } @AndroidIncompatible // sun.security public void testNoProviders() { ProviderList providers = Providers.getProviderList();
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Dec 27 16:19:35 UTC 2024 - 13.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/MacHashFunctionTest.java
String algorithm = cell.getRowKey(); SecretKey key = cell.getColumnKey(); HashFunction hashFunc = cell.getValue(); assertMacHashing(HashTestUtils.ascii(stringToTest), algorithm, key, hashFunc); } } } @AndroidIncompatible // sun.security public void testNoProviders() { ProviderList providers = Providers.getProviderList();
Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Fri Dec 27 16:19:35 UTC 2024 - 13.8K bytes - Viewed (0)