- Sort Score
- Num 10 results
- Language All
Results 11 - 20 of 38 for hashBytes (0.28 seconds)
-
android/guava/src/com/google/common/hash/Murmur3_32HashFunction.java
shift -= 32; } } int k1 = mixK1((int) buffer); h1 ^= k1; return fmix(h1, len); } else { return hashBytes(input.toString().getBytes(charset)); } } @Override public HashCode hashBytes(byte[] input, int off, int len) { checkPositionIndexes(off, off + len, input.length); int h1 = seed; int i;Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 11.8K bytes - Click Count (0) -
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() {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 6.8K bytes - Click Count (0) -
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() {Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 6.8K bytes - Click Count (0) -
android/guava-tests/benchmark/com/google/common/hash/HashStringBenchmark.java
int res = 0; for (int i = 0; i < reps; i++) { res += System.identityHashCode( hashFunctionEnum .getHashFunction() .hashBytes(strings[i & SAMPLE_MASK].getBytes(UTF_8))); } return res; } @Benchmark int hashUtf8GetBytesHasher(int reps) { int res = 0; for (int i = 0; i < reps; i++) { res +=Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 5.3K bytes - Click Count (0) -
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);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Tue Oct 28 18:19:59 GMT 2025 - 25.6K bytes - Click Count (0) -
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);
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 14.2K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/hash/AbstractNonStreamingHashFunctionTest.java
} } static class NonStreamingVersion extends AbstractNonStreamingHashFunction { @Override public int bits() { return 32; } @Override public HashCode hashBytes(byte[] input, int off, int len) { return HashCode.fromBytes(Arrays.copyOfRange(input, off, off + len)); } }Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Dec 19 18:03:30 GMT 2024 - 4.5K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java
verifyNoMoreInteractions(hashFunction, hasher); } public void testHash_hashesCorrectly() throws Exception { byte[] buf = new byte[] {'y', 'a', 'm', 's'}; HashCode expectedHash = sha512().hashBytes(buf); HashingOutputStream out = new HashingOutputStream(sha512(), buffer); out.write(buf); assertEquals(expectedHash, out.hash()); } public void testChecksForNull() throws Exception {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 3.2K bytes - Click Count (0) -
guava-tests/test/com/google/common/hash/HashCodeTest.java
assertThat(hashCode.bits()).isAtLeast(32); // sanity byte[] hashBytes = hashCode.asBytes(); int totalBytes = hashCode.bits() / 8; for (int bytes = 0; bytes < totalBytes; bytes++) { byte[] bb = new byte[bytes]; hashCode.writeBytesTo(bb, 0, bb.length); assertThat(bb).isEqualTo(Arrays.copyOf(hashBytes, bytes)); } } private static class ExpectedHashCode {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 13.2K bytes - Click Count (0) -
guava-tests/test/com/google/common/hash/HashingOutputStreamTest.java
verifyNoMoreInteractions(hashFunction, hasher); } public void testHash_hashesCorrectly() throws Exception { byte[] buf = new byte[] {'y', 'a', 'm', 's'}; HashCode expectedHash = sha512().hashBytes(buf); HashingOutputStream out = new HashingOutputStream(sha512(), buffer); out.write(buf); assertEquals(expectedHash, out.hash()); } public void testChecksForNull() throws Exception {
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Mar 19 18:53:45 GMT 2026 - 3.2K bytes - Click Count (0)