Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 51 for newHasher (0.18 sec)

  1. android/guava/src/com/google/common/hash/AbstractHashFunction.java

        int len = input.length();
        return newHasher(len * 2).putUnencodedChars(input).hash();
      }
    
      @Override
      public HashCode hashString(CharSequence input, Charset charset) {
        return newHasher().putString(input, charset).hash();
      }
    
      @Override
      public HashCode hashInt(int input) {
        return newHasher(4).putInt(input).hash();
      }
    
      @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 2.5K bytes
    - Viewed (0)
  2. android/guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        assertHash(expected, murmur3_32().newHasher().putString(string, charset).hash());
        assertHash(expected, murmur3_32_fixed().newHasher().putString(string, charset).hash());
        assertHash(expected, murmur3_32().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32_fixed().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32().newHasher().putBytes(string.getBytes(charset)).hash());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        hasher = HASH_FN.newHasher();
        hasher
            .putChar((char) 0x0101)
            .putChar((char) 0x0100)
            .putChar((char) 0x0000)
            .putChar((char) 0x0000);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putBytes(new byte[] {0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00});
        assertEquals(hashCode, hasher.hash().asLong());
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 15:56:47 GMT 2017
    - 6.2K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

       * and checks that their results are identical, no matter which newHasher version we used.
       */
      public void testExhaustive() {
        List<Hasher> hashers =
            ImmutableList.of(
                new StreamingVersion().newHasher(),
                new StreamingVersion().newHasher(52),
                new NonStreamingVersion().newHasher(),
                new NonStreamingVersion().newHasher(123));
        Random random = new Random(0);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

       * and checks that their results are identical, no matter which newHasher version we used.
       */
      public void testExhaustive() {
        List<Hasher> hashers =
            ImmutableList.of(
                new StreamingVersion().newHasher(),
                new StreamingVersion().newHasher(52),
                new NonStreamingVersion().newHasher(),
                new NonStreamingVersion().newHasher(123));
        Random random = new Random(0);
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  6. android/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")
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
  7. 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);
      }
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 3.1K bytes
    - Viewed (0)
  8. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        assertHash(expected, murmur3_32().newHasher().putString(string, charset).hash());
        assertHash(expected, murmur3_32_fixed().newHasher().putString(string, charset).hash());
        assertHash(expected, murmur3_32().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32_fixed().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32().newHasher().putBytes(string.getBytes(charset)).hash());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        hasher = HASH_FN.newHasher();
        hasher
            .putChar((char) 0x0101)
            .putChar((char) 0x0100)
            .putChar((char) 0x0000)
            .putChar((char) 0x0000);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher.putBytes(new byte[] {0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00});
        assertEquals(hashCode, hasher.hash().asLong());
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jul 19 14:00:24 GMT 2016
    - 6.2K bytes
    - Viewed (0)
  10. 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")
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 25.3K bytes
    - Viewed (0)
Back to top