Node:The IKeyAgreementParty Interface, Next:, Previous:Protocols, Up:Key Agreements

The IKeyAgreementParty Interface

java.lang.String name () Function
Returns the canonical name of the key agreement protocol.

void init (java.util.Map attributes) throws gnu.crypto.key.KeyAgreementException Function
Initializes this instance. The attributes parameter must be a java.util.Map that has the required name-value pairs needed for this instance. An instance of gnu.crypto.key.KeyAgreementException is thrown if an exception occurs during this process.

gnu.crypto.key.OutgoingMessage processMessage (gnu.crypto.key.IncomingMessage in) throws gnu.crypto.key.KeyAgreementException Function
Processes an incoming message (in) at one end, generating a message (the returned object which may be null) that will be processed by the other party(ies). A gnu.crypto.key.KeyAgreementException may be thrown if an exception occurs during this process.

boolean isComplete () Function
Returns true if the party in the key agreement protocol exchange has completed its part of the exchange; and false otherwise. If this method returns false, then an java.lang.IllegalStateException is thrown for any method invocation except init.

byte [] getSharedSecret () throws gnu.crypto.key.KeyAgreementException Function
Returns the byte array containing the shared secret as generated by this party. A gnu.crypto.key.KeyAgreementException is thrown if the key agreement is not yet initialised, or is initialised but the exchange is still in progress.

void reset () Function
Resets this instance for re-use with another set of attributes.