Home
last modified time | relevance | path

Searched refs:Hashing (Results 1 – 25 of 139) sorted by relevance

123456

/external/guava/guava-tests/test/com/google/common/hash/
DHashingTest.java50 HashTestUtils.checkAvalanche(Hashing.md5(), 100, 0.4); in testMd5()
51 HashTestUtils.checkNo2BitCharacteristics(Hashing.md5()); in testMd5()
52 HashTestUtils.checkNoFunnels(Hashing.md5()); in testMd5()
53 HashTestUtils.assertInvariants(Hashing.md5()); in testMd5()
54 assertEquals("Hashing.md5()", Hashing.md5().toString()); in testMd5()
58 HashTestUtils.checkAvalanche(Hashing.sha1(), 100, 0.4); in testSha1()
59 HashTestUtils.checkNo2BitCharacteristics(Hashing.sha1()); in testSha1()
60 HashTestUtils.checkNoFunnels(Hashing.sha1()); in testSha1()
61 HashTestUtils.assertInvariants(Hashing.sha1()); in testSha1()
62 assertEquals("Hashing.sha1()", Hashing.sha1().toString()); in testSha1()
[all …]
DHashFunctionEnum.java25 ADLER32(Hashing.adler32()),
26 CRC32(Hashing.crc32()),
27 GOOD_FAST_HASH_32(Hashing.goodFastHash(32)),
28 GOOD_FAST_HASH_64(Hashing.goodFastHash(64)),
29 GOOD_FAST_HASH_128(Hashing.goodFastHash(128)),
30 GOOD_FAST_HASH_256(Hashing.goodFastHash(256)),
31 MD5(Hashing.md5()),
32 MURMUR3_128(Hashing.murmur3_128()),
33 MURMUR3_32(Hashing.murmur3_32()),
34 SHA1(Hashing.sha1()),
[all …]
DMessageDigestHashFunctionTest.java42 .put("MD5", Hashing.md5())
43 .put("SHA", Hashing.sha1()) // Not the official name, but still works
44 .put("SHA1", Hashing.sha1()) // Not the official name, but still works
45 .put("sHa-1", Hashing.sha1()) // Not the official name, but still works
46 .put("SHA-1", Hashing.sha1())
47 .put("SHA-256", Hashing.sha256())
48 .put("SHA-384", Hashing.sha384())
49 .put("SHA-512", Hashing.sha512())
61 Hasher sha1 = Hashing.sha1().newHasher(); in testPutAfterHash()
76 Hasher sha1 = Hashing.sha1().newHasher(); in testHashTwice()
[all …]
DMacHashFunctionTest.java56 .put("HmacMD5", MD5_KEY, Hashing.hmacMd5(MD5_KEY))
57 .put("HmacSHA1", SHA1_KEY, Hashing.hmacSha1(SHA1_KEY))
58 .put("HmacSHA256", SHA256_KEY, Hashing.hmacSha256(SHA256_KEY))
59 .put("HmacSHA512", SHA512_KEY, Hashing.hmacSha512(SHA512_KEY))
85 Hashing.hmacMd5(MD5_KEY); in testNoProviders()
101 Hashing.hmacSha1(SHA1_KEY) in testMultipleUpdates()
116 Hashing.hmacSha1(SHA1_KEY) in testMultipleUpdatesDoFinal()
144 Hashing.hmacMd5(customKey) in testCustomKey()
168 Hashing.hmacMd5(badKey); in testBadKey_emptyKey()
182 assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).newHasher().hash().toString()); in testEmptyInputs()
[all …]
DHashingInputStreamTest.java109 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectly()
110 HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer); in testHash_hashesCorrectly()
120 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectlyReadOutOfBound()
121 HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer); in testHash_hashesCorrectlyReadOutOfBound()
132 HashCode expectedHash = Hashing.md5().hashBytes(new byte[] {'m', 's'}); in testHash_hashesCorrectlyForSkipping()
133 HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer); in testHash_hashesCorrectlyForSkipping()
148 tester.testAllPublicInstanceMethods(new HashingInputStream(Hashing.md5(), buffer)); in testChecksForNull()
DSipHashFunctionTest.java33 private static final HashFunction SIP_WITH_KEY = Hashing.sipHash24(K0, K1);
34 private static final HashFunction SIP_WITHOUT_KEY = Hashing.sipHash24();
126 assertEquals(0xa129ca6149be45e5L, Hashing.sipHash24(k0, k1).hashBytes(message).asLong()); in test15ByteStringFromSipHashPaper()
164 assertEquals("Hashing.sipHash24(20, 13)", Hashing.sipHash24(20, 13).toString()); in testToString()
DHashingOutputStreamTest.java78 HashCode expectedHash = Hashing.md5().hashBytes(buf); in testHash_hashesCorrectly()
79 HashingOutputStream out = new HashingOutputStream(Hashing.md5(), buffer); in testHash_hashesCorrectly()
89 new HashingOutputStream(Hashing.md5(), new ByteArrayOutputStream())); in testChecksForNull()
/external/guava/android/guava-tests/test/com/google/common/hash/
DHashingTest.java50 HashTestUtils.checkAvalanche(Hashing.md5(), 100, 0.4); in testMd5()
51 HashTestUtils.checkNo2BitCharacteristics(Hashing.md5()); in testMd5()
52 HashTestUtils.checkNoFunnels(Hashing.md5()); in testMd5()
53 HashTestUtils.assertInvariants(Hashing.md5()); in testMd5()
54 assertEquals("Hashing.md5()", Hashing.md5().toString()); in testMd5()
58 HashTestUtils.checkAvalanche(Hashing.sha1(), 100, 0.4); in testSha1()
59 HashTestUtils.checkNo2BitCharacteristics(Hashing.sha1()); in testSha1()
60 HashTestUtils.checkNoFunnels(Hashing.sha1()); in testSha1()
61 HashTestUtils.assertInvariants(Hashing.sha1()); in testSha1()
62 assertEquals("Hashing.sha1()", Hashing.sha1().toString()); in testSha1()
[all …]
DHashFunctionEnum.java25 ADLER32(Hashing.adler32()),
26 CRC32(Hashing.crc32()),
27 GOOD_FAST_HASH_32(Hashing.goodFastHash(32)),
28 GOOD_FAST_HASH_64(Hashing.goodFastHash(64)),
29 GOOD_FAST_HASH_128(Hashing.goodFastHash(128)),
30 GOOD_FAST_HASH_256(Hashing.goodFastHash(256)),
31 MD5(Hashing.md5()),
32 MURMUR3_128(Hashing.murmur3_128()),
33 MURMUR3_32(Hashing.murmur3_32()),
34 SHA1(Hashing.sha1()),
[all …]
DMessageDigestHashFunctionTest.java42 .put("MD5", Hashing.md5())
43 .put("SHA", Hashing.sha1()) // Not the official name, but still works
44 .put("SHA1", Hashing.sha1()) // Not the official name, but still works
45 .put("sHa-1", Hashing.sha1()) // Not the official name, but still works
46 .put("SHA-1", Hashing.sha1())
47 .put("SHA-256", Hashing.sha256())
48 .put("SHA-384", Hashing.sha384())
49 .put("SHA-512", Hashing.sha512())
61 Hasher sha1 = Hashing.sha1().newHasher(); in testPutAfterHash()
76 Hasher sha1 = Hashing.sha1().newHasher(); in testHashTwice()
[all …]
DMacHashFunctionTest.java56 .put("HmacMD5", MD5_KEY, Hashing.hmacMd5(MD5_KEY))
57 .put("HmacSHA1", SHA1_KEY, Hashing.hmacSha1(SHA1_KEY))
58 .put("HmacSHA256", SHA256_KEY, Hashing.hmacSha256(SHA256_KEY))
59 .put("HmacSHA512", SHA512_KEY, Hashing.hmacSha512(SHA512_KEY))
85 Hashing.hmacMd5(MD5_KEY); in testNoProviders()
101 Hashing.hmacSha1(SHA1_KEY) in testMultipleUpdates()
116 Hashing.hmacSha1(SHA1_KEY) in testMultipleUpdatesDoFinal()
144 Hashing.hmacMd5(customKey) in testCustomKey()
168 Hashing.hmacMd5(badKey); in testBadKey_emptyKey()
182 assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).newHasher().hash().toString()); in testEmptyInputs()
[all …]
DHashingInputStreamTest.java109 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectly()
110 HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer); in testHash_hashesCorrectly()
120 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectlyReadOutOfBound()
121 HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer); in testHash_hashesCorrectlyReadOutOfBound()
132 HashCode expectedHash = Hashing.md5().hashBytes(new byte[] {'m', 's'}); in testHash_hashesCorrectlyForSkipping()
133 HashingInputStream in = new HashingInputStream(Hashing.md5(), buffer); in testHash_hashesCorrectlyForSkipping()
148 tester.testAllPublicInstanceMethods(new HashingInputStream(Hashing.md5(), buffer)); in testChecksForNull()
DSipHashFunctionTest.java33 private static final HashFunction SIP_WITH_KEY = Hashing.sipHash24(K0, K1);
34 private static final HashFunction SIP_WITHOUT_KEY = Hashing.sipHash24();
126 assertEquals(0xa129ca6149be45e5L, Hashing.sipHash24(k0, k1).hashBytes(message).asLong()); in test15ByteStringFromSipHashPaper()
164 assertEquals("Hashing.sipHash24(20, 13)", Hashing.sipHash24(20, 13).toString()); in testToString()
DHashingOutputStreamTest.java78 HashCode expectedHash = Hashing.md5().hashBytes(buf); in testHash_hashesCorrectly()
79 HashingOutputStream out = new HashingOutputStream(Hashing.md5(), buffer); in testHash_hashesCorrectly()
89 new HashingOutputStream(Hashing.md5(), new ByteArrayOutputStream())); in testChecksForNull()
/external/tensorflow/tensorflow/python/keras/layers/preprocessing/
Dhashing_test.py41 layer = hashing.Hashing(num_bins=1)
47 layer = hashing.Hashing(num_bins=2)
55 empty_mask_layer = hashing.Hashing(num_bins=3, mask_value='')
56 omar_mask_layer = hashing.Hashing(num_bins=3, mask_value='omar')
68 layer = hashing.Hashing(num_bins=2)
80 layer = hashing.Hashing(num_bins=3)
87 layer = hashing.Hashing(num_bins=2, salt=[133, 137])
95 layer_2 = hashing.Hashing(num_bins=2, salt=[211, 137])
101 layer = hashing.Hashing(num_bins=3, salt=[133, 137])
108 layer = hashing.Hashing(num_bins=2)
[all …]
/external/guava/guava-tests/benchmark/com/google/common/hash/
DMessageDigestAlgorithmBenchmark.java74 MD5("MD5", Hashing.md5()),
75 SHA_1("SHA-1", Hashing.sha1()),
76 SHA_256("SHA-256", Hashing.sha256()),
77 SHA_384("SHA-384", Hashing.sha384()),
78 SHA_512("SHA-512", Hashing.sha512());
DChecksumBenchmark.java58 return runHashFunction(reps, Hashing.crc32()); in crc32HashFunction()
76 return runHashFunction(reps, Hashing.adler32()); in adler32HashFunction()
95 result ^= Hashing.crc32().hashInt(reps).asBytes()[0]; in runHashFunction()
96 result ^= Hashing.adler32().hashInt(reps).asBytes()[0]; in runHashFunction()
/external/guava/android/guava-tests/benchmark/com/google/common/hash/
DMessageDigestAlgorithmBenchmark.java74 MD5("MD5", Hashing.md5()),
75 SHA_1("SHA-1", Hashing.sha1()),
76 SHA_256("SHA-256", Hashing.sha256()),
77 SHA_384("SHA-384", Hashing.sha384()),
78 SHA_512("SHA-512", Hashing.sha512());
DChecksumBenchmark.java58 return runHashFunction(reps, Hashing.crc32()); in crc32HashFunction()
76 return runHashFunction(reps, Hashing.adler32()); in adler32HashFunction()
95 result ^= Hashing.crc32().hashInt(reps).asBytes()[0]; in runHashFunction()
96 result ^= Hashing.adler32().hashInt(reps).asBytes()[0]; in runHashFunction()
/external/guava/android/guava/src/com/google/common/collect/
DHashBiMap.java114 int tableSize = Hashing.closedTableSize(expectedSize, 1.0); in init()
169 int newTableSize = Hashing.closedTableSize(minCapacity, 1.0); in ensureCapacity()
174 int keyHash = Hashing.smearedHash(keys[entryToRehash]); in ensureCapacity()
179 int valueHash = Hashing.smearedHash(values[entryToRehash]); in ensureCapacity()
197 return findEntryByKey(key, Hashing.smearedHash(key)); in findEntryByKey()
209 return findEntryByValue(value, Hashing.smearedHash(value)); in findEntryByValue()
271 int keyHash = Hashing.smearedHash(key); in put()
283 int valueHash = Hashing.smearedHash(value); in put()
316 int valueHash = Hashing.smearedHash(value); in putInverse()
329 int keyHash = Hashing.smearedHash(key); in putInverse()
[all …]
DHashing.java31 final class Hashing { class
32 private Hashing() {} in Hashing() method in Hashing
DRegularImmutableMap.java113 for (int h = Hashing.smear(key.hashCode()); ; h++) { in createHashTable()
140 for (int h = Hashing.smear(key.hashCode()); ; h++) { in createHashTable()
164 for (int h = Hashing.smear(key.hashCode()); ; h++) { in createHashTable()
228 for (int h = Hashing.smear(key.hashCode()); ; h++) { in get()
240 for (int h = Hashing.smear(key.hashCode()); ; h++) { in get()
252 for (int h = Hashing.smear(key.hashCode()); ; h++) { in get()
/external/caliper/caliper/src/main/java/com/google/caliper/model/
DPersistentHashing.java20 import com.google.common.hash.Hashing;
29 return Hashing.murmur3_32(); in getPersistentHashFunction()
/external/guava/guava/src/com/google/common/collect/
DHashing.java31 final class Hashing { class
32 private Hashing() {} in Hashing() method in Hashing
/external/turbine/javatests/com/google/turbine/zip/
DZipTest.java24 import com.google.common.hash.Hashing;
95 je.setCrc(Hashing.crc32().hashBytes(bytes).padToLong()); in createEntry()
103 result.put(e.name(), Hashing.goodFastHash(128).hashBytes(e.data()).padToLong()); in actual()
116 Hashing.goodFastHash(128) in expected()

123456