Package com.google.common.hash
@ParametersAreNonnullByDefault
package com.google.common.hash
Hash functions and related structures.
See the Guava User Guide article on hashing.
-
ClassDescriptionAbstract
Hasherthat handles converting primitives to bytes using a scratchByteBufferand streams all bytes to a sink to compute the hash.An abstract composition of multiple hash functions.An abstract implementation ofHasher, which only requires subtypes to implementHasher.putByte(byte).Skeleton implementation ofHashFunctionin terms ofHashFunction.newHasher().Skeleton implementation ofHashFunction, appropriate for non-streaming algorithms.A convenience base class for implementors ofHasher; handles accumulating data until an entire "chunk" (of implementation-dependent length) is ready to be hashed.BloomFilter<T>A Bloom filter for instances ofT.A strategy to translate T instances, tonumHashFunctionsbit indexes.Collections of strategies of generating the k * log(M) bits required for an element to be mapped to a BloomFilter of M bits and k hash functions.Models a lock-free array of bits.HashFunctionadapter forChecksuminstances.This class generates a CRC32C checksum, defined by RFC 3720, Section 12.1.Marks all "top-level" types as non-null in a way that is recognized by Kotlin.Implementation of FarmHash Fingerprint64, an open-source fingerprinting algorithm for strings.Implementation of Geoff Pike's fingerprint2011 hash function.Funnel<T>An object which can send data from an object of typeTinto aPrimitiveSink.Funnels for common types.An immutable hash code of arbitrary bit length.APrimitiveSinkthat can compute a hash code after reading the input.A hash function is a collision-averse pure function that maps an arbitrary block of data to a number called a hash code.Static methods to obtainHashFunctioninstances, and other static hashing-related utilities.Linear CongruentialGenerator to use for consistent hashing.AnInputStreamthat maintains a hash of the data read from it.AnOutputStreamthat maintains a hash of the data written to it.Disables Animal Sniffer's checking of compatibility with older versions of Java/Android.Explicitly named subinterface ofSupplierthat can be marked @Immutable.Wrappers aroundBuffermethods that are covariantly overridden in Java 9+.Utility functions for loading and storing values from a byte array.Fallback implementation for when Unsafe is not available in our current environment.Common interface for retrieving a 64-bit long from a little-endian byte array.The only reference to Unsafe is in this nested class.Abstract interface for objects that can concurrently add longs.Source ofLongAddableobjects that deals with GWT, Unsafe, and all that.One or more variables that together maintain an initially zerolongsum.HashFunctionadapter forMacinstances.Hasher that updates aMac(message authentication code).HashFunctionadapter forMessageDigestinstances.Hasher that updates a message digest.See MurmurHash3_x64_128 in the C++ implementation.See MurmurHash3_x86_32 in the C++ implementation.Annotates a "top-level" type-variable usage that takes its nullness from the type argument supplied by the user of the class.An object which can receive a stream of primitive values.HashFunctionimplementation of SipHash-c-d.A package-local class holding common representation and mechanics for classes supporting dynamic striping on 64bit values.Padded variant of AtomicLong supporting only raw accesses plus CAS.