|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavacard.security.MessageDigest
com.licel.jcardsim.crypto.MessageDigestImpl
public class MessageDigestImpl
Implementation MessageDigest based
on BouncyCastle CryptoAPI
MessageDigest,
MD5Digest,
RIPEMD160Digest,
SHA1Digest| Field Summary |
|---|
| Fields inherited from class javacard.security.MessageDigest |
|---|
ALG_MD5, ALG_RIPEMD160, ALG_SHA |
| Constructor Summary | |
|---|---|
MessageDigestImpl(byte algorithm)
|
|
| Method Summary | |
|---|---|
short |
doFinal(byte[] inBuff,
short inOffset,
short inLength,
byte[] outBuff,
short outOffset)
Generates a hash of all/last input data. |
byte |
getAlgorithm()
Gets the Message digest algorithm. |
byte |
getLength()
Returns the byte length of the hash. |
void |
reset()
Resets the MessageDigest object to the initial state for further use. |
void |
update(byte[] inBuff,
short inOffset,
short inLength)
Accumulates a hash of the input data. |
| Methods inherited from class javacard.security.MessageDigest |
|---|
getInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MessageDigestImpl(byte algorithm)
| Method Detail |
|---|
public byte getAlgorithm()
MessageDigest
getAlgorithm in class MessageDigestpublic byte getLength()
MessageDigest
getLength in class MessageDigest
public short doFinal(byte[] inBuff,
short inOffset,
short inLength,
byte[] outBuff,
short outOffset)
MessageDigestMessageDigest object is reset to the initial state after this call is made.
The input and output buffer data may overlap.
doFinal in class MessageDigestinBuff - the input buffer of data to be hashedinOffset - the offset into the input buffer at which to begin hash generationinLength - the byte length to hashoutBuff - the output buffer, may be the same as the input bufferoutOffset - the offset into the output buffer where the resulting hash value begins
outBuff
public void update(byte[] inBuff,
short inOffset,
short inLength)
MessageDigestdoFinal()
method is recommended. The doFinal()
method must be called to complete processing of input data accumulated by one or more
calls to the update() method.
Note:
inLength is 0 this method does nothing.
update in class MessageDigestinBuff - the input buffer of data to be hashedinOffset - the offset into the input buffer at which to begin hash generationinLength - the byte length to hash
See also: MessageDigest.doFinal(byte[], short, short, byte[], short)public void reset()
MessageDigestMessageDigest object to the initial state for further use.
reset in class MessageDigest
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||