IKeyAgreementParty (GNU cryptographic primitives and tools)
Keywords: gnu.crypto.key.IKeyAgreementParty,IKeyAgreementParty interface

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.crypto.key
Interface IKeyAgreementParty

All Known Implementing Classes:
  BaseKeyAgreementParty

public interface IKeyAgreementParty

The visible methods of an key agreement protocol participating party.

Method Summary
`byte[]` | `getSharedSecret()` Returns the byte array containing the shared secret as generated by this party.
`void` | `init(java.util.Map attributes)` Sets up the instance to operate with specific attributes.
`boolean` | `isComplete()` Returns `true` if the party in the key agreement protocol exchange has completed its part of the exchange.
`java.lang.String` | `name()` Returns the canonical name of the key agreement protocol.
`OutgoingMessage` | `processMessage(IncomingMessage in)` Processes an incoming message at one end, generating a message that will be processed by the other party(ies).
`void` | `reset()` Resets this instance for re-use with another set of attributes.

Method Detail

### name

    public java.lang.String name()

  Returns the canonical name of the key agreement protocol.

  Returns:
    the canonical name of the key agreement protocol.

### init

    public void init(java.util.Map attributes)
              throws KeyAgreementException

  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.

### processMessage

    public OutgoingMessage processMessage(IncomingMessage in)
                                   throws KeyAgreementException

  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.

### 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.

### getSharedSecret

    public byte[] getSharedSecret()
                           throws KeyAgreementException

  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.

### reset

    public void reset()

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

Overview | Package | Class | Tree | Serialized | Deprecated | Index | Help
| For the latest news and information visit The GNU Crypto project
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001, 2002, 2003, 2004 Free Software Foundation, Inc.