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
-
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 Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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
-
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
-
processWord
protected abstract void processWord(byte[] in, int inOff) -
processLength
protected abstract void processLength(long bitLength) -
processBlock
protected abstract void processBlock()
-