Package com.google.common.hash
Class MacHashFunction.MacHasher
- java.lang.Object
-
- com.google.common.hash.AbstractHasher
-
- com.google.common.hash.AbstractByteHasher
-
- com.google.common.hash.MacHashFunction.MacHasher
-
- All Implemented Interfaces:
Hasher,PrimitiveSink
- Enclosing class:
- MacHashFunction
private static final class MacHashFunction.MacHasher extends AbstractByteHasher
Hasher that updates aMac(message authentication code).
-
-
Constructor Summary
Constructors Modifier Constructor Description privateMacHasher(javax.crypto.Mac mac)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcheckNotDone()HashCodehash()Computes a hash code based on the data that have been provided to this hasher.protected voidupdate(byte b)Updates this hasher with the given byte.protected voidupdate(byte[] b)Updates this hasher with the given bytes.protected voidupdate(byte[] b, int off, int len)Updates this hasher withlenbytes starting atoffin the given buffer.protected voidupdate(java.nio.ByteBuffer bytes)Updates this hasher with bytes from the given buffer.-
Methods inherited from class com.google.common.hash.AbstractByteHasher
putByte, putBytes, putBytes, putBytes, putChar, putInt, putLong, putShort
-
Methods inherited from class com.google.common.hash.AbstractHasher
putBoolean, putDouble, putFloat, putObject, putString, putUnencodedChars
-
-
-
-
Method Detail
-
update
protected void update(byte b)
Description copied from class:AbstractByteHasherUpdates this hasher with the given byte.- Specified by:
updatein classAbstractByteHasher
-
update
protected void update(byte[] b)
Description copied from class:AbstractByteHasherUpdates this hasher with the given bytes.- Overrides:
updatein classAbstractByteHasher
-
update
protected void update(byte[] b, int off, int len)Description copied from class:AbstractByteHasherUpdates this hasher withlenbytes starting atoffin the given buffer.- Overrides:
updatein classAbstractByteHasher
-
update
protected void update(java.nio.ByteBuffer bytes)
Description copied from class:AbstractByteHasherUpdates this hasher with bytes from the given buffer.- Overrides:
updatein classAbstractByteHasher
-
checkNotDone
private void checkNotDone()
-
-