HashFunction adapter for MessageDigest instances.
| Modifier and Type | Class and Description |
|---|---|
| private static class | MessageDigestHashFunction.
Hasher that updates a message digest. |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final MessageDigest | |
| private final boolean | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | bits()
Implements com. |
| private static MessageDigest | |
| public Hasher | newHasher()
Implements com. Hasher
instance that is ready to receive data.
|
| private void | |
| private static boolean | |
| public String | |
| pack-priv Object |
| bytes | back to summary |
|---|---|
| private final int bytes | |
| prototype | back to summary |
|---|---|
private final MessageDigest prototype
| |
| supportsClone | back to summary |
|---|---|
| private final boolean supportsClone | |
| toString | back to summary |
|---|---|
| private final String toString | |
| MessageDigestHashFunction | back to summary |
|---|---|
| pack-priv MessageDigestHashFunction(String algorithmName, String toString) | |
| MessageDigestHashFunction | back to summary |
|---|---|
| pack-priv MessageDigestHashFunction(String algorithmName, int bytes, String toString) | |
| bits | back to summary |
|---|---|
| public int bits() Implements com. Doc from com. Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.
| |
| getMessageDigest | back to summary |
|---|---|
| private static MessageDigest getMessageDigest(String algorithmName) | |
| newHasher | back to summary |
|---|---|
| public Hasher newHasher() Implements com. Doc from com. Begins a new hash code computation by returning an initialized, stateful
| |
| readObject | back to summary |
|---|---|
| private void readObject(ObjectInputStream stream) throws InvalidObjectException | |
| supportsClone | back to summary |
|---|---|
| private static boolean supportsClone(MessageDigest digest) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| writeReplace | back to summary |
|---|---|
| pack-priv Object writeReplace() | |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final MessageDigest | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public HashCode | hash()
Implements com. |
| protected void | update(byte b)
Implements abstract com. |
| protected void | update(byte[] b, int off, int len)
Overrides com. len bytes starting at off in the given buffer.
|
| protected void | update(ByteBuffer bytes)
Updates this hasher with bytes from the given buffer.
|
| bytes | back to summary |
|---|---|
| private final int bytes | |
| digest | back to summary |
|---|---|
| private final MessageDigest digest | |
| done | back to summary |
|---|---|
| private boolean done | |
| MessageDigestHasher | back to summary |
|---|---|
| private MessageDigestHasher(MessageDigest digest, int bytes) | |
| checkNotDone | back to summary |
|---|---|
| private void checkNotDone() | |
| hash | back to summary |
|---|---|
| public HashCode hash() Implements com. Doc from com. Computes a hash code based on the data that have been provided to this hasher. The result is unspecified if this method is called more than once on the same instance.
| |
| update | back to summary |
|---|---|
| protected void update(byte b) Implements abstract com. Doc from com. Updates this hasher with the given byte.
| |
| update | back to summary |
|---|---|
| protected void update(byte[] b, int off, int len) Overrides com. Doc from com. Updates this hasher with
| |
| update | back to summary |
|---|---|
| protected void update(ByteBuffer bytes) Overrides com. Doc from com. Updates this hasher with bytes from the given buffer.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final int | |
| private static final long | |
| private final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private Object |
| algorithmName | back to summary |
|---|---|
| private final String algorithmName | |
| bytes | back to summary |
|---|---|
| private final int bytes | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| toString | back to summary |
|---|---|
| private final String toString | |
| SerializedForm | back to summary |
|---|---|
| private SerializedForm(String algorithmName, int bytes, String toString) | |
| readResolve | back to summary |
|---|---|
| private Object readResolve() | |