public abstract class AbstractMessageDigestSpi extends MessageDigestSpi implements Cloneable
sun.security.provider.DigestBase.| Modifier and Type | Method and Description |
|---|---|
byte[] |
engineDigest()
Completes the hash computation by performing final operations such as padding.
|
protected int |
engineDigest(byte[] out,
int ofs,
int len)
Completes the hash computation by performing final operations such as padding.
|
int |
engineGetDigestLength()
Returns the digest length in bytes.
|
protected void |
engineReset()
Resets the digest for further use.
|
protected void |
engineUpdate(byte b)
Updates the digest using the specified byte.
|
void |
engineUpdate(byte[] b,
int ofs,
int len)
Updates the digest using the specified array of bytes, starting at the specified offset.
|
clonepublic final byte[] engineDigest()
MessageDigestSpiengineDigest has been
called, the engine should be reset (see engineReset). Resetting is the responsibility of
the engine implementor.engineDigest in class MessageDigestSpiprotected final int engineDigest(byte[] out,
int ofs,
int len)
throws DigestException
MessageDigestSpiengineDigest has been
called, the engine should be reset (see engineReset). Resetting is the responsibility of
the engine implementor.
This method should be abstract, but we leave it concrete for binary compatibility. Knowledgeable providers should
override this method.engineDigest in class MessageDigestSpiout - the output buffer in which to store the digestofs - offset to start from in the output bufferlen - number of bytes within buf allotted for the digest. Both this default implementation and the SUN
provider do not return partial digests. The presence of this parameter is solely for consistency in
our API's. If the value of this parameter is less than the actual digest length, the method will throw
a DigestException. This parameter is ignored if its value is greater than or equal to the actual
digest length.DigestException - if an error occurs.public final int engineGetDigestLength()
MessageDigestSpiThis concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.)
The default behavior is to return 0.
This method may be overridden by a provider to return the digest length.
engineGetDigestLength in class MessageDigestSpiprotected void engineReset()
MessageDigestSpiengineReset in class MessageDigestSpiprotected final void engineUpdate(byte b)
MessageDigestSpiengineUpdate in class MessageDigestSpib - the byte to use for the update.public final void engineUpdate(byte[] b,
int ofs,
int len)
MessageDigestSpiengineUpdate in class MessageDigestSpib - the array of bytes to use for the update.ofs - the offset to start from in the array of bytes.len - the number of bytes to use, starting at offset.