gnu.crypto.key

Interface IKeyAgreementParty

public interface IKeyAgreementParty

The visible methods of an key agreement protocol participating party.

Version: $Revision: 1.2 $

Method Summary
byte[]getSharedSecret()

Returns the byte array containing the shared secret as generated by this party.

voidinit(Map attributes)

Sets up the instance to operate with specific attributes.

booleanisComplete()

Returns true if the party in the key agreement protocol exchange has completed its part of the exchange.

Stringname()

Returns the canonical name of the key agreement protocol.

OutgoingMessageprocessMessage(IncomingMessage in)

Processes an incoming message at one end, generating a message that will be processed by the other party(ies).

voidreset()
Resets this instance for re-use with another set of attributes.

Method Detail

getSharedSecret

public byte[] getSharedSecret()

Returns the byte array containing the shared secret as generated by this party.

Returns: the generated shared secret.

Throws: KeyAgreementException if the key agreement is not yet initialised, or is initialised but the exchange is still in progress.

init

public void init(Map attributes)

Sets up the instance to operate with specific attributes.

Parameters: attributes a map of name-values used by concrete implementations.

Throws: KeyAgreementException if an exception occurs during the setup.

isComplete

public boolean isComplete()

Returns true if the party in the key agreement protocol exchange has completed its part of the exchange. If this is the case an IllegalStateException is thrown for any method invocation except init() or reset().

Returns: true if this party has completed its part of the key agreement protocol exchange; false otherwise.

name

public String name()

Returns the canonical name of the key agreement protocol.

Returns: the canonical name of the key agreement protocol.

processMessage

public OutgoingMessage processMessage(IncomingMessage in)

Processes an incoming message at one end, generating a message that will be processed by the other party(ies).

Parameters: in the incoming message.

Returns: an outgoing message, or null if this is an intermediary step that does not cause any output.

Throws: KeyAgreementException if an exception occurs during the processing of the incoming message, or during the generation of the outgoing message.

reset

public void reset()
Resets this instance for re-use with another set of attributes.
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.