Top Description Fields Constructors Methods
com.ongres.scram.common.bouncycastle.pbkdf2

public abstract Class GeneralDigest

extends Object
implements ExtendedDigest, Memoable
Class Inheritance
All Implemented Interfaces
com.ongres.scram.common.bouncycastle.pbkdf2.Memoable, com.ongres.scram.common.bouncycastle.pbkdf2.ExtendedDigest, com.ongres.scram.common.bouncycastle.pbkdf2.Digest
Known Direct Subclasses
com.ongres.scram.common.bouncycastle.pbkdf2.SHA256Digest

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

Field Summary

Modifier and TypeField and Description
private static final int
private long
private final byte[]
private int

Constructor Summary

AccessConstructor and Description
protected
GeneralDigest()

Standard constructor

protected
GeneralDigest(GeneralDigest t)

Copy constructor.

protected
GeneralDigest(byte[] encodedState)

Method Summary

Modifier and TypeMethod and Description
protected void
public void
public int
getByteLength()

Implements com.ongres.scram.common.bouncycastle.pbkdf2.ExtendedDigest.getByteLength.

Return the size in bytes of the internal buffer the digest applies it's compression function to.
protected void
populateState(byte[] state)

protected abstract void
protected abstract void
processLength(long bitLength)

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

public void
reset()

Implements com.ongres.scram.common.bouncycastle.pbkdf2.Digest.reset.

reset the digest back to it's initial state.
public void
update(byte
the input byte to be entered.
in
)

Implements com.ongres.scram.common.bouncycastle.pbkdf2.Digest.update.

update the message digest with a single byte.
public void
update(byte[]
the byte array containing the data.
in
,
int
the offset into the byte array where the data starts.
inOff
,
int
the length of the data.
len
)

Implements com.ongres.scram.common.bouncycastle.pbkdf2.Digest.update.

update the message digest with a block of bytes.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BYTE_LENGTHback to summary
private static final int BYTE_LENGTH
byteCountback to summary
private long byteCount
xBufback to summary
private final byte[] xBuf
xBufOffback to summary
private int xBufOff

Constructor Detail

GeneralDigestback to summary
protected GeneralDigest()

Standard constructor

GeneralDigestback to summary
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.

GeneralDigestback to summary
protected GeneralDigest(byte[] encodedState)

Method Detail

copyInback to summary
protected void copyIn(GeneralDigest t)
finishback to summary
public void finish()
getByteLengthback to summary
public int getByteLength()

Implements com.ongres.scram.common.bouncycastle.pbkdf2.ExtendedDigest.getByteLength.

Doc from com.ongres.scram.common.bouncycastle.pbkdf2.ExtendedDigest.getByteLength.

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

Returns:int

byte length of the digests internal buffer.

populateStateback to summary
protected void populateState(byte[] state)
processBlockback to summary
protected abstract void processBlock()
processLengthback to summary
protected abstract void processLength(long bitLength)
processWordback to summary
protected abstract void processWord(byte[] in, int inOff)
resetback to summary
public void reset()

Implements com.ongres.scram.common.bouncycastle.pbkdf2.Digest.reset.

Doc from com.ongres.scram.common.bouncycastle.pbkdf2.Digest.reset.

reset the digest back to it's initial state.

updateback to summary
public void update(byte in)

Implements com.ongres.scram.common.bouncycastle.pbkdf2.Digest.update.

Doc from com.ongres.scram.common.bouncycastle.pbkdf2.Digest.update.

update the message digest with a single byte.

Parameters
in:byte

the input byte to be entered.

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

Implements com.ongres.scram.common.bouncycastle.pbkdf2.Digest.update.

Doc from com.ongres.scram.common.bouncycastle.pbkdf2.Digest.update.

update the message digest with a block of bytes.

Parameters
in:byte[]

the byte array containing the data.

inOff:int

the offset into the byte array where the data starts.

len:int

the length of the data.