Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 138 for hamster (0.24 sec)

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

     */
    @Beta
    @ElementTypesAreNonnullByDefault
    public interface Hasher extends PrimitiveSink {
      @CanIgnoreReturnValue
      @Override
      Hasher putByte(byte b);
    
      @CanIgnoreReturnValue
      @Override
      Hasher putBytes(byte[] bytes);
    
      @CanIgnoreReturnValue
      @Override
      Hasher putBytes(byte[] bytes, int off, int len);
    
      @CanIgnoreReturnValue
      @Override
      Hasher putBytes(ByteBuffer bytes);
    
      @CanIgnoreReturnValue
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 5.5K bytes
    - Viewed (0)
  2. 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();
    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/src/com/google/common/hash/Murmur3_128HashFunction.java

    /*
     * MurmurHash3 was written by Austin Appleby, and is placed in the public
     * domain. The author hereby disclaims copyright to this source code.
     */
    
    /*
     * Source:
     * https://github.com/aappleby/smhasher/blob/master/src/MurmurHash3.cpp
     * (Modified to adapt to Guava coding conventions and to use the HashFunction interface)
     */
    
    package com.google.common.hash;
    
    import static com.google.common.primitives.UnsignedBytes.toInt;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.6K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java

        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());
    
        hasher = HASH_FN.newHasher();
        hasher.putLong(0x0000000001000101L);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher
    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)
  5. android/guava-tests/test/com/google/common/hash/Fingerprint2011Test.java

        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());
    
        hasher = HASH_FN.newHasher();
        hasher.putLong(0x0000000001000101L);
        assertEquals(hashCode, hasher.hash().asLong());
    
        hasher = HASH_FN.newHasher();
        hasher
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 29 14:55:25 GMT 2021
    - 7.6K bytes
    - Viewed (0)
  6. guava-tests/test/com/google/common/hash/HashingInputStreamTest.java

     */
    public class HashingInputStreamTest extends TestCase {
      private Hasher hasher;
      private HashFunction hashFunction;
      private static final byte[] testBytes = new byte[] {'y', 'a', 'm', 's'};
      private ByteArrayInputStream buffer;
    
      @SuppressWarnings("DoNotMock")
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        hasher = mock(Hasher.class);
        hashFunction = mock(HashFunction.class);
    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. android/guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java

     */
    public class HashingOutputStreamTest extends TestCase {
      private Hasher hasher;
      private HashFunction hashFunction;
      private final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    
      @SuppressWarnings("DoNotMock")
      @Override
      protected void setUp() throws Exception {
        super.setUp();
        hasher = mock(Hasher.class);
        hashFunction = mock(HashFunction.class);
    
    Java
    - Registered: Fri Apr 26 12:43:10 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/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();
    
    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)
  9. android/guava/src/com/google/common/hash/MacHashFunction.java

        } catch (NoSuchAlgorithmException e) {
          throw new IllegalStateException(e);
        } catch (InvalidKeyException e) {
          throw new IllegalArgumentException(e);
        }
      }
    
      @Override
      public Hasher newHasher() {
        if (supportsClone) {
          try {
            return new MacHasher((Mac) prototype.clone());
          } catch (CloneNotSupportedException e) {
            // falls through
          }
        }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Feb 15 22:31:55 GMT 2022
    - 3.6K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/hash/MessageDigestHashFunctionTest.java

          for (String algorithmToTest : ALGORITHMS.keySet()) {
            assertMessageDigestHashing(HashTestUtils.ascii(stringToTest), algorithmToTest);
          }
        }
      }
    
      public void testPutAfterHash() {
        Hasher sha1 = Hashing.sha1().newHasher();
    
        assertEquals(
            "2fd4e1c67a2d28fced849ee1bb76e7391b93eb12",
            sha1.putString("The quick brown fox jumps over the lazy dog", Charsets.UTF_8)
                .hash()
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 4.2K bytes
    - Viewed (0)
Back to top