public abstract class

GeneralDigest

extends Object
implements ExtendedDigest
java.lang.Object
   ↳ org.bouncycastle.crypto.digests.GeneralDigest
Known Direct Subclasses

Class Overview

base implementation of MD4 family style digest as outlined in "Handbook of Applied Cryptography", pages 344 - 347.

Summary

Protected Constructors
GeneralDigest()
Standard constructor
GeneralDigest(GeneralDigest t)
Copy constructor.
Public Methods
void finish()
int getByteLength()
Return the size in bytes of the internal buffer the digest applies it's compression function to.
void reset()
reset the digest back to it's initial state.
void update(byte[] in, int inOff, int len)
update the message digest with a block of bytes.
void update(byte in)
update the message digest with a single byte.
Protected Methods
abstract void processBlock()
abstract void processLength(long bitLength)
abstract void processWord(byte[] in, int inOff)
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.bouncycastle.crypto.Digest
From interface org.bouncycastle.crypto.ExtendedDigest

Protected Constructors

protected GeneralDigest ()

Standard constructor

protected GeneralDigest (GeneralDigest t)

Copy constructor. We are using copy constructors in place of the Object.clone() interface as this interface is not supported by J2ME.

Public Methods

public void finish ()

public int getByteLength ()

Return the size in bytes of the internal buffer the digest applies it's compression function to.

Returns
  • byte length of the digests internal buffer.

public void reset ()

reset the digest back to it's initial state.

public void update (byte[] in, int inOff, int len)

update the message digest with a block of bytes.

Parameters
in the byte array containing the data.
inOff the offset into the byte array where the data starts.
len the length of the data.

public void update (byte in)

update the message digest with a single byte.

Parameters
in the input byte to be entered.

Protected Methods

protected abstract void processBlock ()

protected abstract void processLength (long bitLength)

protected abstract void processWord (byte[] in, int inOff)