Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 52 for hashBytes (0.37 sec)

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

        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)
  2. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        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)
  3. guava-tests/test/com/google/common/hash/SipHashFunctionTest.java

        ImmutableSet<HashCode> hashCodes =
            ImmutableSet.of(
                SIP_WITH_KEY.hashBytes(col1),
                SIP_WITH_KEY.hashBytes(col2),
                SIP_WITH_KEY.hashBytes(col3));
        assertEquals(3, hashCodes.size());
      }
    
      public void testToString() {
        assertEquals("Hashing.sipHash24(" + K0 + ", " + K1 + ")", SIP_WITH_KEY.toString());
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Sun May 05 18:02:35 GMT 2019
    - 6.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/HashTestUtils.java

        assertEquals(hashFunction.hashBytes(bytes), hashFunction.hashBytes(ByteBuffer.wrap(bytes)));
      }
    
      static void assertHashByteBufferExhaustsBuffer(HashFunction hashFunction) {
        Random rng = new Random(0L);
        byte[] bytes = new byte[rng.nextInt(256) + 1];
        rng.nextBytes(bytes);
        ByteBuffer buffer = ByteBuffer.wrap(bytes);
        HashCode unused = hashFunction.hashBytes(buffer);
    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)
  5. android/guava-tests/test/com/google/common/hash/SipHashFunctionTest.java

        ImmutableSet<HashCode> hashCodes =
            ImmutableSet.of(
                SIP_WITH_KEY.hashBytes(col1),
                SIP_WITH_KEY.hashBytes(col2),
                SIP_WITH_KEY.hashBytes(col3));
        assertEquals(3, hashCodes.size());
      }
    
      public void testToString() {
        assertEquals("Hashing.sipHash24(" + K0 + ", " + K1 + ")", SIP_WITH_KEY.toString());
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Sun May 05 18:02:35 GMT 2019
    - 6.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

        verify(hashFunction).newHasher();
        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
      public void testHash_hashesCorrectly() throws Exception {
        HashCode expectedHash = Hashing.md5().hashBytes(testBytes);
        HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer);
    
        byte[] buf = new byte[4];
        int numOfByteRead = in.read(buf, 0, buf.length);
        assertEquals(4, numOfByteRead);
    
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/MacHashFunctionTest.java

        Mac mac = Mac.getInstance(algorithm);
        mac.init(key);
        mac.update(input);
    
        assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input));
        assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input));
      }
    
      // Tests from RFC2022: https://tools.ietf.org/html/rfc2202
    
      public void testRfc2202_hmacSha1_case1() {
        byte[] key = fillByteArray(20, 0x0b);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  8. android/guava/src/com/google/common/hash/AbstractNonStreamingHashFunction.java

          buffer.putChar(input.charAt(i));
        }
        return hashBytes(buffer.array());
      }
    
      @Override
      public HashCode hashString(CharSequence input, Charset charset) {
        return hashBytes(input.toString().getBytes(charset));
      }
    
      @Override
      public abstract HashCode hashBytes(byte[] input, int off, int len);
    
      @Override
      public HashCode hashBytes(ByteBuffer input) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 3.8K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/AbstractHashFunction.java

      }
    
      @Override
      public HashCode hashBytes(byte[] input) {
        return hashBytes(input, 0, input.length);
      }
    
      @Override
      public HashCode hashBytes(byte[] input, int off, int len) {
        checkPositionIndexes(off, off + len, input.length);
        return newHasher(len).putBytes(input, off, len).hash();
      }
    
      @Override
      public HashCode hashBytes(ByteBuffer input) {
    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)
  10. android/guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

        verify(hashFunction).newHasher();
        verifyNoMoreInteractions(hashFunction, hasher);
      }
    
      public void testHash_hashesCorrectly() throws Exception {
        HashCode expectedHash = Hashing.md5().hashBytes(testBytes);
        HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer);
    
        byte[] buf = new byte[4];
        int numOfByteRead = in.read(buf, 0, buf.length);
        assertEquals(4, numOfByteRead);
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
Back to top