|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.core3.util.BrokenMd5Hasher
public final class BrokenMd5Hasher
Use this class for getting a MD5 message digest. Create a MD5 and reuse it after a message digest calculation. There can be as many MD5 objects as you want to have multiple calculations same time. The message can be passed in one or a sequenze of parts wrapped in a ByteBuffer to the update of the same MD5 instance. To finish the calculation use final, it will reset the MD5 instance for a new calculation.
Constructor Summary | |
---|---|
BrokenMd5Hasher()
Constructor returns a MD6 ready for use. |
Method Summary | |
---|---|
byte[] |
calculateHash(byte[] data)
|
void |
finalDigest(ByteBuffer digest)
Finishs a MD5 message digest calculation. |
byte[] |
getDigest()
|
void |
reset()
Resets the MD5 to initial state for a new message digest calculation. |
void |
update(byte[] data)
|
void |
update(ByteBuffer input)
Starts or continues a MD5 message digest calculation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BrokenMd5Hasher()
Method Detail |
---|
public byte[] calculateHash(byte[] data)
public void reset()
public void update(ByteBuffer input)
input
- hold a part of the message. input.order() have to be ByteOrder.LITTLE_ENDIANpublic void update(byte[] data)
public byte[] getDigest()
public void finalDigest(ByteBuffer digest)
digest
- should be a ByteBuffer with digest.remaining() >= 16
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |