- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 143 for hashers (0.14 sec)
-
internal/hash/checksum.go
// Matches returns whether given content matches c. func (c Checksum) Matches(content []byte, parts int) error { if len(c.Encoded) == 0 { return nil } hasher := c.Type.Hasher() _, err := hasher.Write(content) if err != nil { return err } sum := hasher.Sum(nil) if c.WantParts > 0 && c.WantParts != parts { return ChecksumMismatch{ Want: fmt.Sprintf("%s-%d", c.Encoded, c.WantParts),
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Sep 19 12:59:07 UTC 2024 - 12.7K bytes - Viewed (0) -
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;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Aug 02 13:50:22 UTC 2024 - 11.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/hash/AbstractByteHasherTest.java
hasher.putShort((short) 0x0201); hasher.assertBytes(new byte[] {1, 2}); } public void testInt() { TestHasher hasher = new TestHasher(); hasher.putInt(0x04030201); hasher.assertBytes(new byte[] {1, 2, 3, 4}); } public void testLong() { TestHasher hasher = new TestHasher(); hasher.putLong(0x0807060504030201L); hasher.assertBytes(new byte[] {1, 2, 3, 4, 5, 6, 7, 8});
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 3.8K bytes - Viewed (0) -
android/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
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 6.2K bytes - Viewed (0) -
guava/src/com/google/common/hash/AbstractHasher.java
/** * An abstract implementation of {@link Hasher}, which only requires subtypes to implement {@link * #putByte}. Subtypes may provide more efficient implementations, however. * * @author Dimitris Andreou */ @ElementTypesAreNonnullByDefault abstract class AbstractHasher implements Hasher { @Override @CanIgnoreReturnValue public final Hasher putBoolean(boolean b) { return putByte(b ? (byte) 1 : (byte) 0);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Jun 15 20:59:00 UTC 2022 - 3.5K bytes - Viewed (0) -
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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 11 22:00:03 UTC 2024 - 3.1K bytes - Viewed (0) -
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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 02 16:24:50 UTC 2020 - 5K bytes - Viewed (0) -
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);
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 02 16:24:50 UTC 2020 - 5K bytes - Viewed (0) -
android/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)
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Fri Oct 18 19:29:46 UTC 2024 - 8.3K bytes - Viewed (0) -
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); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 09 17:40:09 UTC 2024 - 26.3K bytes - Viewed (0)