public abstract class AbstractMessageDigest
extends java.security.MessageDigest
implements java.lang.Cloneable
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Return a clone of this message digest that can be used independently
of this instance.
|
protected byte[] |
engineDigest()
SPI:
Completes the hash computation by performing final operations such as padding.
|
protected int |
engineDigest(byte[] buf,
int offset,
int len)
Calculates the digest value and writes it to the given
output buffer.
|
int |
engineGetDigestLength()
SPI: Returns the length of the digest in bytes.
|
protected abstract void |
engineReset()
SPI: Resets this message digest for further use.
|
protected void |
engineUpdate(byte input)
SPI: Updates the data to be hashed with the specified byte.
|
protected void |
engineUpdate(byte[] input,
int offset,
int len)
SPI: Updates the data to be hashed with the specified number of
bytes, beginning at the specified offset within the given byte array.
|
public java.lang.Object clone()
clone in class java.security.MessageDigestprotected final void engineUpdate(byte input)
engineUpdate in class java.security.MessageDigestSpiinput - the byte to be used for updating.protected void engineUpdate(byte[] input,
int offset,
int len)
engineUpdate in class java.security.MessageDigestSpiinput - the byte array holding the data to be used for this update
operation.offset - the offset, indicating the start position within the given
byte array.len - the number of bytes to be obtained from the given byte array,
starting at the given position.protected byte[] engineDigest()
engineDigest has been called, the engine should be
reset. Resetting is the responsibility of the engine implementor.engineDigest in class java.security.MessageDigestSpiengineReset()protected int engineDigest(byte[] buf,
int offset,
int len)
throws java.security.DigestException
engineDigest in class java.security.MessageDigestSpibuf - the output buffer in which to write the digestoffset - the start offset in the output bufferlen - the length of the digest value.java.security.DigestException - if an error occurs when calculating the digest value.public int engineGetDigestLength()
May not be available for applications before JDK versions >= 1.2.x.
engineGetDigestLength in class java.security.MessageDigestSpiprotected abstract void engineReset()
engineReset in class java.security.MessageDigestSpi