Next: , Previous: Protocols, Up: Key Agreements


8.9 The IKeyAgreementParty Interface

— Function: java.lang.String name ()

Returns the canonical name of the key agreement protocol.

— Function: void init (java.util.Map attributes) throws gnu.crypto.key.KeyAgreementException

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.

— Function: gnu.crypto.key.OutgoingMessage processMessage (gnu.crypto.key.IncomingMessage in) throws gnu.crypto.key.KeyAgreementException

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.

— Function: boolean isComplete ()

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.

— Function: byte [] getSharedSecret () throws gnu.crypto.key.KeyAgreementException

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.

— Function: void reset ()

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