- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 39 for hashBytes (0.12 sec)
-
guava-tests/test/com/google/common/hash/HashCodeTest.java
assertTrue(hashCode.bits() >= 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); assertTrue(Arrays.equals(Arrays.copyOf(hashBytes, bytes), bb)); } } private static class ExpectedHashCode {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 13.1K bytes - Viewed (0) -
internal/event/target/elasticsearch.go
if target.client.isAtleastV7() { hh, _ := highwayhash.New(magicHighwayHash256Key) // New will never return error since key is 256 bit hh.Write([]byte(key)) hashBytes := hh.Sum(nil) keyHash = base64.URLEncoding.EncodeToString(hashBytes) } else { keyHash = key } } if eventData.EventName == event.ObjectRemovedDelete { err = target.client.removeEntry(ctx, target.args.Index, keyHash)
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri Sep 06 23:06:30 UTC 2024 - 15K bytes - Viewed (0) -
android/guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
return md.digest(); } }, HASH_FUNCTION_DIRECT() { @Override public byte[] hash(Algorithm algorithm, byte[] input) { return algorithm.getHashFunction().hashBytes(input).asBytes(); } }, HASH_FUNCTION_VIA_HASHER() { @Override public byte[] hash(Algorithm algorithm, byte[] input) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (0) -
guava-tests/benchmark/com/google/common/hash/MessageDigestAlgorithmBenchmark.java
return md.digest(); } }, HASH_FUNCTION_DIRECT() { @Override public byte[] hash(Algorithm algorithm, byte[] input) { return algorithm.getHashFunction().hashBytes(input).asBytes(); } }, HASH_FUNCTION_VIA_HASHER() { @Override public byte[] hash(Algorithm algorithm, byte[] input) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 3.5K bytes - Viewed (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 = Hashing.md5().hashBytes(buf); HashingOutputStream out = new HashingOutputStream(Hashing.md5(), buffer); out.write(buf); assertEquals(expectedHash, out.hash()); } public void testChecksForNull() throws Exception {
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/HashCodeTest.java
assertTrue(hashCode.bits() >= 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); assertTrue(Arrays.equals(Arrays.copyOf(hashBytes, bytes), bb)); } } private static class ExpectedHashCode {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 13.1K bytes - Viewed (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)); } }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Dec 04 17:37:03 UTC 2017 - 4.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/ByteSourceTester.java
return out.toByteArray(); } }); assertExpectedBytes(readBytes); } public void testHash() throws IOException { HashCode expectedHash = Hashing.md5().hashBytes(expected); assertEquals(expectedHash, source.hash(Hashing.md5())); } public void testSlice_illegalArguments() { assertThrows(
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 8.6K bytes - Viewed (0) -
guava/src/com/google/common/hash/Fingerprint2011.java
private static final long K1 = 0x8d58ac26afe12e47L; private static final long K2 = 0xc47b6e9e3a970ed3L; private static final long K3 = 0xc6a4a7935bd1e995L; @Override public HashCode hashBytes(byte[] input, int off, int len) { checkPositionIndexes(off, off + len, input.length); return HashCode.fromLong(fingerprint(input, off, len)); } @Override public int bits() { return 64; }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Dec 28 17:50:25 UTC 2021 - 6.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/hash/FarmHashFingerprint64Test.java
return fingerprint(bytes, bytes.length); } /** Convenience method to compute a fingerprint on a subset of a byte array. */ private static long fingerprint(byte[] bytes, int length) { return HASH_FN.hashBytes(bytes, 0, length).asLong(); } /** * Tests that the Java port of FarmHashFingerprint64 provides the same results on buffers up to * 800 bytes long as the C++ reference implementation. */
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Jul 23 14:22:54 UTC 2024 - 6.2K bytes - Viewed (0)