Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for HashTestUtils (0.11 sec)

  1. guava-tests/test/com/google/common/hash/HashTestUtils.java

    import java.util.Set;
    import org.junit.Assert;
    
    /**
     * Various utilities for testing {@link HashFunction}s.
     *
     * @author Dimitris Andreou
     * @author Kurt Alfred Kluever
     */
    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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 25.5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/HashingTest.java

        HashTestUtils.checkNoFunnels(Hashing.sha256());
        HashTestUtils.assertInvariants(Hashing.sha256());
        assertEquals("Hashing.sha256()", Hashing.sha256().toString());
      }
    
      public void testSha384() {
        HashTestUtils.checkAvalanche(Hashing.sha384(), 100, 0.4);
        HashTestUtils.checkNo2BitCharacteristics(Hashing.sha384());
        HashTestUtils.checkNoFunnels(Hashing.sha384());
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 09 17:40:09 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

              }
            };
        // Murmur3A, MurmurHash3 for x86, 32-bit (MurmurHash3_x86_32)
        // https://github.com/aappleby/smhasher/blob/master/src/main.cpp
        HashTestUtils.verifyHashFunction(hf, 32, 0xB0F57EE3);
      }
    
      public void testInvariants() {
        HashTestUtils.assertInvariants(murmur3_32());
      }
    
      @SuppressWarnings("deprecation")
      public void testInvalidUnicodeHashString() {
        String str =
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 18 19:29:46 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  4. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  5. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Oct 21 14:28:19 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  7. android/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.collect.Lists;
    import com.google.common.hash.HashTestUtils.RandomHasherAction;
    import java.io.ByteArrayOutputStream;
    import java.nio.ByteBuffer;
    import java.nio.ByteOrder;
    import java.util.Arrays;
    import java.util.Collections;
    import java.util.List;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. 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.collect.Lists;
    import com.google.common.hash.HashTestUtils.RandomHasherAction;
    import java.io.ByteArrayOutputStream;
    import java.nio.ByteBuffer;
    import java.nio.ByteOrder;
    import java.util.Arrays;
    import java.util.Collections;
    import java.util.List;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  9. 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 Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 13.8K bytes
    - Viewed (0)
Back to top