|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.motorola.iden.security.MessageDigestSpi
This class defines the Service Provider Interface (SPI)
for the MessageDigest
class, which provides the functionality
of a message digest algorithm, such as MD5 or SHA. Message digests are
secure one-way hash functions that take arbitrary-sized data and output a
fixed-length hash value.
All the abstract methods in this class must be implemented by a cryptographic service provider who wishes to supply the implementation of a particular message digest algorithm.
MOTOROLA and the Stylized M Logo are registered trademarks of Motorola, Inc. Reg. U.S. Pat. & Tm. Off.
[MessageDigest]
Constructor Summary | |
MessageDigestSpi()
|
Method Summary | |
protected abstract byte[] |
engineDigest()
Completes the hash computation by performing final operations such as padding. |
protected int |
engineGetDigestLength()
Returns the digest length in bytes. |
protected abstract void |
engineReset()
Resets the digest for further use. |
protected abstract void |
engineUpdate(byte input)
Updates the digest using the specified byte. |
protected abstract void |
engineUpdate(byte[] input,
int offset,
int len)
Updates the digest using the specified array of bytes, starting at the specified offset. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MessageDigestSpi()
Method Detail |
protected int engineGetDigestLength()
The default behavior is to return 0.
This method may be overridden by a provider to return the digest length.
protected abstract void engineUpdate(byte input)
input
- the byte to use for the update.protected abstract void engineUpdate(byte[] input, int offset, int len)
input
- the array of bytes to use for the update.offset
- the offset to start from in the array of bytes.len
- the number of bytes to use, starting at
offset
.protected abstract byte[] engineDigest()
engineDigest
has
been called, the engine should be reset.
Resetting is the responsibility of the
engine implementor.protected abstract void engineReset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |