Package com.google.common.hash
Class Crc32cHashFunction
- java.lang.Object
-
- com.google.common.hash.AbstractStreamingHashFunction
-
- com.google.common.hash.Crc32cHashFunction
-
- All Implemented Interfaces:
HashFunction
final class Crc32cHashFunction extends AbstractStreamingHashFunction
This class generates a CRC32C checksum, defined by RFC 3720, Section 12.1. The generator polynomial for this checksum is0x11EDC6F41
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
Crc32cHashFunction.Crc32cHasher
-
Nested classes/interfaces inherited from class com.google.common.hash.AbstractStreamingHashFunction
AbstractStreamingHashFunction.AbstractStreamingHasher
-
-
Constructor Summary
Constructors Constructor Description Crc32cHashFunction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
bits()
Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.Hasher
newHasher()
Begins a new hash code computation by returning an initialized, statefulHasher
instance that is ready to receive data.java.lang.String
toString()
-
Methods inherited from class com.google.common.hash.AbstractStreamingHashFunction
hashBytes, hashBytes, hashInt, hashLong, hashObject, hashString, hashUnencodedChars, newHasher
-
-
-
-
Method Detail
-
bits
public int bits()
Description copied from interface:HashFunction
Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.
-
newHasher
public Hasher newHasher()
Description copied from interface:HashFunction
Begins a new hash code computation by returning an initialized, statefulHasher
instance that is ready to receive data. Example:HashFunction hf = Hashing.md5(); HashCode hc = hf.newHasher() .putLong(id) .putBoolean(isActive) .hash();
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-