Package com.google.common.hash
Class MacHashFunction
java.lang.Object
com.google.common.hash.AbstractHashFunction
com.google.common.hash.MacHashFunction
- All Implemented Interfaces:
HashFunction
HashFunction
adapter for Mac
instances.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
Hasher that updates aMac
(message authentication code). -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
bits()
Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.private static Mac
Begins a new hash code computation by returning an initialized, statefulHasher
instance that is ready to receive data.private static boolean
supportsClone
(Mac mac) toString()
Methods inherited from class com.google.common.hash.AbstractHashFunction
hashBytes, hashBytes, hashBytes, hashInt, hashLong, hashObject, hashString, hashUnencodedChars, newHasher
-
Field Details
-
prototype
-
key
-
toString
-
bits
private final int bits -
supportsClone
private final boolean supportsClone
-
-
Constructor Details
-
MacHashFunction
-
-
Method Details
-
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. -
supportsClone
-
getMac
-
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
-