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
Hasher
that handles converting primitives to bytes using a scratchByteBuffer
and 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 ofHashFunction
in 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, tonumHashFunctions
bit 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.HashFunction
adapter forChecksum
instances.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 typeT
into aPrimitiveSink
.Funnels for common types.An immutable hash code of arbitrary bit length.APrimitiveSink
that 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 obtainHashFunction
instances, and other static hashing-related utilities.Linear CongruentialGenerator to use for consistent hashing.AnInputStream
that maintains a hash of the data read from it.AnOutputStream
that 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 ofSupplier
that can be marked @invalid reference
Immutable
Wrappers aroundBuffer
methods 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 ofLongAddable
objects that deals with GWT, Unsafe, and all that.One or more variables that together maintain an initially zerolong
sum.HashFunction
adapter forMac
instances.Hasher that updates aMac
(message authentication code).HashFunction
adapter forMessageDigest
instances.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.HashFunction
implementation 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.