gnu.crypto.key

Class BaseKeyAgreementParty

public abstract class BaseKeyAgreementParty extends Object implements IKeyAgreementParty

A base abstract class to facilitate implementations of concrete key agreement protocol handlers.

Version: $Revision: 1.3 $

Field Summary
protected booleancomplete
Whether the exchange has concluded or not.
protected booleaninitialised
Whether the instance is initialised or not.
protected IRandomirnd
The optional IRandom instance to use.
protected Stringname
The canonical name of the protocol.
protected SecureRandomrnd
The optional SecureRandom instance to use.
protected intstep
The current step index of the protocol exchange.
protected static BigIntegerTWO
Constructor Summary
protected BaseKeyAgreementParty(String name)
Method Summary
protected abstract voidengineInit(Map attributes)
protected abstract OutgoingMessageengineProcessMessage(IncomingMessage in)
protected abstract voidengineReset()
protected abstract byte[]engineSharedSecret()
byte[]getSharedSecret()
voidinit(Map attributes)
booleanisComplete()
Stringname()
protected voidnextRandomBytes(byte[] buffer)
Fills the designated byte array with random data.
OutgoingMessageprocessMessage(IncomingMessage in)
voidreset()

Field Detail

complete

protected boolean complete
Whether the exchange has concluded or not.

initialised

protected boolean initialised
Whether the instance is initialised or not.

irnd

protected IRandom irnd
The optional IRandom instance to use.

name

protected String name
The canonical name of the protocol.

rnd

protected SecureRandom rnd
The optional SecureRandom instance to use.

step

protected int step
The current step index of the protocol exchange.

TWO

protected static final BigInteger TWO

Constructor Detail

BaseKeyAgreementParty

protected BaseKeyAgreementParty(String name)

Method Detail

engineInit

protected abstract void engineInit(Map attributes)

engineProcessMessage

protected abstract OutgoingMessage engineProcessMessage(IncomingMessage in)

engineReset

protected abstract void engineReset()

engineSharedSecret

protected abstract byte[] engineSharedSecret()

getSharedSecret

public byte[] getSharedSecret()

init

public void init(Map attributes)

isComplete

public boolean isComplete()

name

public String name()

nextRandomBytes

protected void nextRandomBytes(byte[] buffer)
Fills the designated byte array with random data.

Parameters: buffer the byte array to fill with random data.

processMessage

public OutgoingMessage processMessage(IncomingMessage in)

reset

public void reset()
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.