Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for AbstractStreamingHasher (0.45 sec)

  1. guava/src/com/google/common/hash/AbstractStreamingHasher.java

     *
     * @author Kevin Bourrillion
     * @author Dimitris Andreou
     */
    // TODO(kevinb): this class still needs some design-and-document-for-inheritance love
    @ElementTypesAreNonnullByDefault
    abstract class AbstractStreamingHasher extends AbstractHasher {
      /** Buffer via which we pass data to the hash algorithm (the implementor) */
      private final ByteBuffer buffer;
    
      /** Number of bytes to be filled before process() invocation(s). */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 15 20:59:00 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/hash/AbstractStreamingHasher.java

     *
     * @author Kevin Bourrillion
     * @author Dimitris Andreou
     */
    // TODO(kevinb): this class still needs some design-and-document-for-inheritance love
    @ElementTypesAreNonnullByDefault
    abstract class AbstractStreamingHasher extends AbstractHasher {
      /** Buffer via which we pass data to the hash algorithm (the implementor) */
      private final ByteBuffer buffer;
    
      /** Number of bytes to be filled before process() invocation(s). */
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Jun 15 20:59:00 UTC 2022
    - 7.1K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

    import java.nio.ByteOrder;
    import java.util.Arrays;
    import java.util.Collections;
    import java.util.List;
    import java.util.Random;
    import junit.framework.TestCase;
    
    /**
     * Tests for AbstractStreamingHasher.
     *
     * @author Dimitris Andreou
     */
    public class AbstractStreamingHasherTest extends TestCase {
      public void testBytes() {
        Sink sink = new Sink(4); // byte order insignificant here
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. android/guava-tests/test/com/google/common/hash/AbstractStreamingHasherTest.java

    import java.nio.ByteOrder;
    import java.util.Arrays;
    import java.util.Collections;
    import java.util.List;
    import java.util.Random;
    import junit.framework.TestCase;
    
    /**
     * Tests for AbstractStreamingHasher.
     *
     * @author Dimitris Andreou
     */
    public class AbstractStreamingHasherTest extends TestCase {
      public void testBytes() {
        Sink sink = new Sink(4); // byte order insignificant here
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/FunnelsTest.java

        inOrder.verify(elementFunnel).funnel("quux", primitiveSink);
      }
    
      private static void assertNullsThrowException(Funnel<?> funnel) {
        PrimitiveSink primitiveSink =
            new AbstractStreamingHasher(4, 4) {
              @Override
              protected HashCode makeHash() {
                throw new UnsupportedOperationException();
              }
    
              @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/hash/SipHashFunction.java

        }
        return false;
      }
    
      @Override
      public int hashCode() {
        return (int) (getClass().hashCode() ^ c ^ d ^ k0 ^ k1);
      }
    
      private static final class SipHasher extends AbstractStreamingHasher {
        private static final int CHUNK_SIZE = 8;
    
        // The number of compression rounds.
        private final int c;
        // The number of finalization rounds.
        private final int d;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 5.3K bytes
    - Viewed (0)
  7. guava/src/com/google/common/hash/Murmur3_128HashFunction.java

        }
        return false;
      }
    
      @Override
      public int hashCode() {
        return getClass().hashCode() ^ seed;
      }
    
      private static final class Murmur3_128Hasher extends AbstractStreamingHasher {
        private static final int CHUNK_SIZE = 16;
        private static final long C1 = 0x87c37b91114253d5L;
        private static final long C2 = 0x4cf5ad432745937fL;
        private long h1;
        private long h2;
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 5.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

      }
    
      static class StreamingVersion extends AbstractHashFunction {
        @Override
        public int bits() {
          return 32;
        }
    
        @Override
        public Hasher newHasher() {
          return new AbstractStreamingHasher(4, 4) {
            final ByteArrayOutputStream out = new ByteArrayOutputStream();
    
            @Override
            protected HashCode makeHash() {
              return HashCode.fromBytes(out.toByteArray());
            }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Dec 04 17:37:03 UTC 2017
    - 4.4K bytes
    - Viewed (0)
  9. guava/src/com/google/common/hash/SipHashFunction.java

        }
        return false;
      }
    
      @Override
      public int hashCode() {
        return (int) (getClass().hashCode() ^ c ^ d ^ k0 ^ k1);
      }
    
      private static final class SipHasher extends AbstractStreamingHasher {
        private static final int CHUNK_SIZE = 8;
    
        // The number of compression rounds.
        private final int c;
        // The number of finalization rounds.
        private final int d;
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 5.3K bytes
    - Viewed (0)
  10. guava/src/com/google/common/hash/Crc32cHashFunction.java

      @Override
      public Hasher newHasher() {
        return new Crc32cHasher();
      }
    
      @Override
      public String toString() {
        return "Hashing.crc32c()";
      }
    
      static final class Crc32cHasher extends AbstractStreamingHasher {
    
        /*
         * The striding algorithm works roughly as follows: it is universally the case that
         * CRC(x ^ y) == CRC(x) ^ CRC(y).  The approach we take is to break the message as follows,
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Apr 20 18:43:59 UTC 2021
    - 21.3K bytes
    - Viewed (0)
Back to top