Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 49 for Thrasher (0.19 sec)

  1. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Fri Oct 02 16:24:50 GMT 2020
    - 5K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

              HashTestUtils.randomHighSurrogate(new Random()),
              HashTestUtils.randomLowSurrogate(new Random())
            });
      }
    
      private static void assertPutString(char[] chars) {
        Hasher h1 = new NonStreamingVersion().newHasher();
        Hasher h2 = new NonStreamingVersion().newHasher();
        String s = new String(chars);
        // this is the correct implementation of the spec
        for (int i = 0; i < s.length(); i++) {
    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)
  3. android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java

              HashTestUtils.randomHighSurrogate(new Random()),
              HashTestUtils.randomLowSurrogate(new Random())
            });
      }
    
      private static void assertPutString(char[] chars) {
        Hasher h1 = new NonStreamingVersion().newHasher();
        Hasher h2 = new NonStreamingVersion().newHasher();
        String s = new String(chars);
        // this is the correct implementation of the spec
        for (int i = 0; i < s.length(); i++) {
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java

        @CanIgnoreReturnValue
        @Override
        public Hasher putInt(int i) {
          update(4, i);
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        public Hasher putLong(long l) {
          update(4, (int) l);
          update(4, l >>> 32);
          return this;
        }
    
        @CanIgnoreReturnValue
        @Override
        public Hasher putChar(char c) {
          update(2, c);
          return this;
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Jun 15 20:59:00 GMT 2022
    - 11.9K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        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();
              }
            };
        // Murmur3A, MurmurHash3 for x86, 32-bit (MurmurHash3_x86_32)
    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)
  6. android/guava-tests/test/com/google/common/hash/HashingTest.java

      }
    
      public void testHashIntVsForLoop() {
        int input = 42;
        HashCode expected = Hashing.md5().hashInt(input);
    
        Hasher hasher = Hashing.md5().newHasher();
        for (int i = 0; i < 32; i += 8) {
          hasher.putByte((byte) (input >> i));
        }
        HashCode actual = hasher.hash();
    
        assertEquals(expected, actual);
      }
    
      private static final String EMPTY_STRING = "";
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 26.5K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/hash/HashTestUtils.java

      }
    
      static HashCode randomHash(HashFunction hashFunction, Random random, int numActions) {
        Hasher hasher = hashFunction.newHasher();
        for (int i = 0; i < numActions; i++) {
          RandomHasherAction.pickAtRandom(random).performAction(random, ImmutableSet.of(hasher));
        }
        return hasher.hash();
      }
    
      private static void assertShortcutsAreEquivalent(HashFunction hashFunction, int trials) {
    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)
  8. android/guava/src/com/google/common/hash/SipHashFunction.java

        this.c = c;
        this.d = d;
        this.k0 = k0;
        this.k1 = k1;
      }
    
      @Override
      public int bits() {
        return 64;
      }
    
      @Override
      public Hasher newHasher() {
        return new SipHasher(c, d, k0, k1);
      }
    
      // TODO(kak): Implement and benchmark the hashFoo() shortcuts.
    
      @Override
      public String toString() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 5.3K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/hash/Crc32cHashFunction.java

    final class Crc32cHashFunction extends AbstractHashFunction {
      static final HashFunction CRC_32_C = new Crc32cHashFunction();
    
      @Override
      public int bits() {
        return 32;
      }
    
      @Override
      public Hasher newHasher() {
        return new Crc32cHasher();
      }
    
      @Override
      public String toString() {
        return "Hashing.crc32c()";
      }
    
      static final class Crc32cHasher extends AbstractStreamingHasher {
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Apr 20 18:43:59 GMT 2021
    - 21.3K bytes
    - Viewed (0)
  10. 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)
Back to top