public abstract class Digest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ByteArrayStream |
input |
Constructor and Description |
---|
Digest() |
Modifier and Type | Method and Description |
---|---|
abstract java.lang.String |
getAlgorithm()
Returns the name of the algorithm.
|
abstract int |
getBlockLength()
Returns the block length.
|
byte[] |
getDigest()
Finalizes the message digest operation by processing all the accumulated input data and returning the result in a new buffer.
|
abstract int |
getDigestLength()
Returns the message digest length.
|
protected abstract byte[] |
process(byte[] data) |
void |
reset()
Initializes this message digest.
|
java.lang.String |
toString()
Returns the name of the algorithm.
|
void |
update(byte[] data)
Updates the input data that will be processed by this message digest algorithm.
|
void |
update(byte[] data,
int start,
int count)
Updates the input data that will be processed by this message digest algorithm.
|
void |
update(int data)
Updates the input data that will be processed by this message digest algorithm.
|
protected ByteArrayStream input
public java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String getAlgorithm()
public abstract int getBlockLength()
public abstract int getDigestLength()
public final void reset()
public final void update(int data)
getDigest()
is finally called.data
- The input data.public final void update(byte[] data)
getDigest()
is finally called.data
- The input data.public final void update(byte[] data, int start, int count)
getDigest()
is finally called.data
- The input data.start
- The offset in data
where the data starts.count
- The input length.public final byte[] getDigest()
protected abstract byte[] process(byte[] data)