Package com.google.common.hash
Class MessageDigestHashFunction.MessageDigestHasher
- java.lang.Object
-
- com.google.common.hash.AbstractHasher
-
- com.google.common.hash.AbstractByteHasher
-
- com.google.common.hash.MessageDigestHashFunction.MessageDigestHasher
-
- All Implemented Interfaces:
Hasher
,PrimitiveSink
- Enclosing class:
- MessageDigestHashFunction
private static final class MessageDigestHashFunction.MessageDigestHasher extends AbstractByteHasher
Hasher that updates a message digest.
-
-
Constructor Summary
Constructors Modifier Constructor Description private
MessageDigestHasher(java.security.MessageDigest digest, int bytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkNotDone()
HashCode
hash()
Computes a hash code based on the data that have been provided to this hasher.protected void
update(byte b)
Updates this hasher with the given byte.protected void
update(byte[] b)
Updates this hasher with the given bytes.protected void
update(byte[] b, int off, int len)
Updates this hasher withlen
bytes starting atoff
in the given buffer.-
Methods inherited from class com.google.common.hash.AbstractByteHasher
putByte, putBytes, putBytes, putChar, putInt, putLong, putObject, putShort
-
Methods inherited from class com.google.common.hash.AbstractHasher
putBoolean, putDouble, putFloat, putString, putUnencodedChars
-
-
-
-
Method Detail
-
update
protected void update(byte b)
Description copied from class:AbstractByteHasher
Updates this hasher with the given byte.- Specified by:
update
in classAbstractByteHasher
-
update
protected void update(byte[] b)
Description copied from class:AbstractByteHasher
Updates this hasher with the given bytes.- Overrides:
update
in classAbstractByteHasher
-
update
protected void update(byte[] b, int off, int len)
Description copied from class:AbstractByteHasher
Updates this hasher withlen
bytes starting atoff
in the given buffer.- Overrides:
update
in classAbstractByteHasher
-
checkNotDone
private void checkNotDone()
-
-