/external/guava/android/guava/src/com/google/common/hash/ |
D | AbstractNonStreamingHashFunction.java | 47 return hashBytes(ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(input).array()); in hashInt() 52 return hashBytes(ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(input).array()); in hashLong() 62 return hashBytes(buffer.array()); in hashUnencodedChars() 67 return hashBytes(input.toString().getBytes(charset)); in hashString() 71 public abstract HashCode hashBytes(byte[] input, int off, int len); in hashBytes() method in AbstractNonStreamingHashFunction 74 public HashCode hashBytes(ByteBuffer input) { in hashBytes() method in AbstractNonStreamingHashFunction 106 return hashBytes(stream.byteArray(), 0, stream.length()); in hash()
|
D | AbstractHashFunction.java | 58 public HashCode hashBytes(byte[] input) { in hashBytes() method in AbstractHashFunction 59 return hashBytes(input, 0, input.length); in hashBytes() 63 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() method in AbstractHashFunction 69 public HashCode hashBytes(ByteBuffer input) { in hashBytes() method in AbstractHashFunction
|
D | HashFunction.java | 162 HashCode hashBytes(byte[] input); in hashBytes() method 171 HashCode hashBytes(byte[] input, int off, int len); in hashBytes() method 179 HashCode hashBytes(ByteBuffer input); in hashBytes() method
|
D | Murmur3_32HashFunction.java | 189 return hashBytes(input.toString().getBytes(charset)); in hashString() 208 return hashBytes(input.toString().getBytes(charset)); in hashString() 213 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() method in Murmur3_32HashFunction
|
/external/guava/guava/src/com/google/common/hash/ |
D | AbstractNonStreamingHashFunction.java | 47 return hashBytes(ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(input).array()); in hashInt() 52 return hashBytes(ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(input).array()); in hashLong() 62 return hashBytes(buffer.array()); in hashUnencodedChars() 67 return hashBytes(input.toString().getBytes(charset)); in hashString() 71 public abstract HashCode hashBytes(byte[] input, int off, int len); in hashBytes() method in AbstractNonStreamingHashFunction 74 public HashCode hashBytes(ByteBuffer input) { in hashBytes() method in AbstractNonStreamingHashFunction 106 return hashBytes(stream.byteArray(), 0, stream.length()); in hash()
|
D | AbstractHashFunction.java | 58 public HashCode hashBytes(byte[] input) { in hashBytes() method in AbstractHashFunction 59 return hashBytes(input, 0, input.length); in hashBytes() 63 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() method in AbstractHashFunction 69 public HashCode hashBytes(ByteBuffer input) { in hashBytes() method in AbstractHashFunction
|
D | HashFunction.java | 162 HashCode hashBytes(byte[] input); in hashBytes() method 171 HashCode hashBytes(byte[] input, int off, int len); in hashBytes() method 179 HashCode hashBytes(ByteBuffer input); in hashBytes() method
|
D | Murmur3_32HashFunction.java | 189 return hashBytes(input.toString().getBytes(charset)); in hashString() 208 return hashBytes(input.toString().getBytes(charset)); in hashString() 213 public HashCode hashBytes(byte[] input, int off, int len) { in hashBytes() method in Murmur3_32HashFunction
|
/external/guava/android/guava-tests/test/com/google/common/hash/ |
D | SipHashFunctionTest.java | 126 assertEquals(0xa129ca6149be45e5L, Hashing.sipHash24(k0, k1).hashBytes(message).asLong()); in test15ByteStringFromSipHashPaper() 155 SIP_WITH_KEY.hashBytes(col1), in testCollisionsDueToIncorrectSignExtension() 156 SIP_WITH_KEY.hashBytes(col2), in testCollisionsDueToIncorrectSignExtension() 157 SIP_WITH_KEY.hashBytes(col3)); in testCollisionsDueToIncorrectSignExtension() 175 assertEquals(expected, SIP_WITH_KEY.hashBytes(input).asLong()); in assertSip() 177 assertEquals(expected, SIP_WITHOUT_KEY.hashBytes(input).asLong()); in assertSip()
|
D | HashTestUtils.java | 58 int hashBytes = hashbits / 8; in verifyHashFunction() local 61 byte[] hashes = new byte[hashBytes * 256]; in verifyHashFunction() 68 System.arraycopy(hash, 0, hashes, i * hashBytes, hash.length); in verifyHashFunction() 494 assertEquals(hashFunction.hashBytes(bytes), hashFunction.hashBytes(ByteBuffer.wrap(bytes))); in assertHashByteBufferMatchesBytes() 502 HashCode unused = hashFunction.hashBytes(buffer); in assertHashByteBufferExhaustsBuffer() 512 assertEquals(hashFunction.hashBytes(littleEndian), hashFunction.hashBytes(littleEndian)); in assertHashByteBufferPreservesByteOrder() 532 HashCode unused = hashFunction.hashBytes(new byte[64], 0, 0); in assertHashBytesThrowsCorrectExceptions() 536 hashFunction.hashBytes(new byte[128], -1, 128); in assertHashBytesThrowsCorrectExceptions() 541 hashFunction.hashBytes(new byte[128], 64, 256 /* too long len */); in assertHashBytesThrowsCorrectExceptions() 546 hashFunction.hashBytes(new byte[64], 0, -1); in assertHashBytesThrowsCorrectExceptions() [all …]
|
D | Murmur3Hash32Test.java | 69 murmur3_32().hashBytes("ABCDefGHI\u0799".getBytes(Charsets.UTF_8)), in testSimpleStringUtf8() 92 murmur3_32().hashBytes(str.getBytes(Charsets.UTF_8)), in testStringInputsUtf8() 106 return murmur3_32(seed).hashBytes(input).asBytes(); in testParanoidHashBytes() 139 murmur3_32().hashBytes(str.getBytes(Charsets.UTF_8)), in testInvalidUnicodeHashString() 148 murmur3_32().hashBytes(str.getBytes(Charsets.UTF_8)), in testInvalidUnicodeHasherPutString()
|
D | HashingInputStreamTest.java | 108 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectly() 119 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectlyReadOutOfBound() 131 HashCode expectedHash = Hashing.md5().hashBytes(new byte[] {'m', 's'}); in testHash_hashesCorrectlyForSkipping()
|
D | ChecksumHashFunctionTest.java | 74 assertEquals(value, func.hashBytes(bytes).padToLong()); in assertChecksum() 82 assertEquals(expected, func.hashBytes(bytes).asInt()); in assertHash32()
|
D | MacHashFunctionTest.java | 204 assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashBytes(input.getBytes(UTF_8)).toString()); in testKnownInputs() 218 knownOutput, Hashing.hmacMd5(SHA1_KEY).hashBytes(input.getBytes(UTF_8)).toString()); in testKnownInputs_mixedAlgorithms() 283 assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input)); in assertMacHashing() 284 assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input)); in assertMacHashing() 404 assertEquals(HashCode.fromString(expected), hashFunc.hashBytes(data)); in checkHmac()
|
D | MessageDigestHashFunctionTest.java | 101 HashCode.fromBytes(digest.digest(input)), ALGORITHMS.get(algorithmName).hashBytes(input)); in assertMessageDigestHashing() 105 new MessageDigestHashFunction(algorithmName, bytes, algorithmName).hashBytes(input)); in assertMessageDigestHashing()
|
/external/guava/guava-tests/test/com/google/common/hash/ |
D | SipHashFunctionTest.java | 126 assertEquals(0xa129ca6149be45e5L, Hashing.sipHash24(k0, k1).hashBytes(message).asLong()); in test15ByteStringFromSipHashPaper() 155 SIP_WITH_KEY.hashBytes(col1), in testCollisionsDueToIncorrectSignExtension() 156 SIP_WITH_KEY.hashBytes(col2), in testCollisionsDueToIncorrectSignExtension() 157 SIP_WITH_KEY.hashBytes(col3)); in testCollisionsDueToIncorrectSignExtension() 175 assertEquals(expected, SIP_WITH_KEY.hashBytes(input).asLong()); in assertSip() 177 assertEquals(expected, SIP_WITHOUT_KEY.hashBytes(input).asLong()); in assertSip()
|
D | HashTestUtils.java | 58 int hashBytes = hashbits / 8; in verifyHashFunction() local 61 byte[] hashes = new byte[hashBytes * 256]; in verifyHashFunction() 68 System.arraycopy(hash, 0, hashes, i * hashBytes, hash.length); in verifyHashFunction() 494 assertEquals(hashFunction.hashBytes(bytes), hashFunction.hashBytes(ByteBuffer.wrap(bytes))); in assertHashByteBufferMatchesBytes() 502 HashCode unused = hashFunction.hashBytes(buffer); in assertHashByteBufferExhaustsBuffer() 512 assertEquals(hashFunction.hashBytes(littleEndian), hashFunction.hashBytes(littleEndian)); in assertHashByteBufferPreservesByteOrder() 532 HashCode unused = hashFunction.hashBytes(new byte[64], 0, 0); in assertHashBytesThrowsCorrectExceptions() 536 hashFunction.hashBytes(new byte[128], -1, 128); in assertHashBytesThrowsCorrectExceptions() 541 hashFunction.hashBytes(new byte[128], 64, 256 /* too long len */); in assertHashBytesThrowsCorrectExceptions() 546 hashFunction.hashBytes(new byte[64], 0, -1); in assertHashBytesThrowsCorrectExceptions() [all …]
|
D | Murmur3Hash32Test.java | 69 murmur3_32().hashBytes("ABCDefGHI\u0799".getBytes(Charsets.UTF_8)), in testSimpleStringUtf8() 92 murmur3_32().hashBytes(str.getBytes(Charsets.UTF_8)), in testStringInputsUtf8() 106 return murmur3_32(seed).hashBytes(input).asBytes(); in testParanoidHashBytes() 139 murmur3_32().hashBytes(str.getBytes(Charsets.UTF_8)), in testInvalidUnicodeHashString() 148 murmur3_32().hashBytes(str.getBytes(Charsets.UTF_8)), in testInvalidUnicodeHasherPutString()
|
D | HashingInputStreamTest.java | 108 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectly() 119 HashCode expectedHash = Hashing.md5().hashBytes(testBytes); in testHash_hashesCorrectlyReadOutOfBound() 131 HashCode expectedHash = Hashing.md5().hashBytes(new byte[] {'m', 's'}); in testHash_hashesCorrectlyForSkipping()
|
D | ChecksumHashFunctionTest.java | 74 assertEquals(value, func.hashBytes(bytes).padToLong()); in assertChecksum() 82 assertEquals(expected, func.hashBytes(bytes).asInt()); in assertHash32()
|
D | MacHashFunctionTest.java | 204 assertEquals(knownOutput, Hashing.hmacMd5(MD5_KEY).hashBytes(input.getBytes(UTF_8)).toString()); in testKnownInputs() 218 knownOutput, Hashing.hmacMd5(SHA1_KEY).hashBytes(input.getBytes(UTF_8)).toString()); in testKnownInputs_mixedAlgorithms() 283 assertEquals(HashCode.fromBytes(mac.doFinal()), hashFunc.hashBytes(input)); in assertMacHashing() 284 assertEquals(HashCode.fromBytes(mac.doFinal(input)), hashFunc.hashBytes(input)); in assertMacHashing() 404 assertEquals(HashCode.fromString(expected), hashFunc.hashBytes(data)); in checkHmac()
|
D | MessageDigestHashFunctionTest.java | 101 HashCode.fromBytes(digest.digest(input)), ALGORITHMS.get(algorithmName).hashBytes(input)); in assertMessageDigestHashing() 105 new MessageDigestHashFunction(algorithmName, bytes, algorithmName).hashBytes(input)); in assertMessageDigestHashing()
|
/external/guava/guava-tests/benchmark/com/google/common/hash/ |
D | HashFunctionBenchmark.java | 69 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in hashFunction() 79 result ^= hashFunction.hashBytes(testBytes, 1, testBytes.length - 1).asBytes()[0]; in hashFunctionWithOffset()
|
/external/guava/android/guava-tests/benchmark/com/google/common/hash/ |
D | HashFunctionBenchmark.java | 69 result ^= hashFunction.hashBytes(testBytes).asBytes()[0]; in hashFunction() 79 result ^= hashFunction.hashBytes(testBytes, 1, testBytes.length - 1).asBytes()[0]; in hashFunctionWithOffset()
|
/external/turbine/javatests/com/google/turbine/zip/ |
D | ZipTest.java | 95 je.setCrc(Hashing.crc32().hashBytes(bytes).padToLong()); in createEntry() 103 result.put(e.name(), Hashing.goodFastHash(128).hashBytes(e.data()).padToLong()); in actual() 117 .hashBytes(ByteStreams.toByteArray(jf.getInputStream(je))) in expected()
|