Class GeneralDigest
java.lang.Object
org.gudy.bouncycastle.crypto.digests.GeneralDigest
- All Implemented Interfaces:
Digest
- Direct Known Subclasses:
MD4Digest,MD5Digest,RIPEMD128Digest,RIPEMD160Digest,RIPEMD256Digest,RIPEMD320Digest,SHA1Digest,SHA256Digest
base implementation of MD4 family style digest as outlined in
"Handbook of Applied Cryptography", pages 344 - 347.
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedStandard constructorprotectedCopy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()protected abstract voidprotected abstract voidprocessLength(long bitLength) protected abstract voidprocessWord(byte[] in, int inOff) voidreset()reset the digest back to it's initial state.voidupdate(byte in) update the message digest with a single byte.voidupdate(byte[] in, int inOff, int len) update the message digest with a block of bytes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gudy.bouncycastle.crypto.Digest
doFinal, getAlgorithmName, getDigestSize
-
Field Details
-
xBuf
private byte[] xBuf -
xBufOff
private int xBufOff -
byteCount
private long byteCount
-
-
Constructor Details
-
GeneralDigest
protected GeneralDigest()Standard constructor -
GeneralDigest
Copy constructor. We are using copy constructors in place of the Object.clone() interface as this interface is not supported by J2ME.
-
-
Method Details
-
update
public void update(byte in) Description copied from interface:Digestupdate the message digest with a single byte. -
update
public void update(byte[] in, int inOff, int len) Description copied from interface:Digestupdate the message digest with a block of bytes. -
finish
public void finish() -
reset
public void reset()Description copied from interface:Digestreset the digest back to it's initial state. -
processWord
protected abstract void processWord(byte[] in, int inOff) -
processLength
protected abstract void processLength(long bitLength) -
processBlock
protected abstract void processBlock()
-