public interface GordianAgreement
Key Agreement Specification.
  • Method Details

    • getAgreementParams

      GordianAgreementParams getAgreementParams()
      Obtain the agreementParameters.
      Returns:
      the parameters
    • getStatus

      Obtain agreement status.
      Returns:
      the agreement state
    • getResult

      Object getResult() throws GordianException
      Obtain result.
      Returns:
      the result which can be any of
      GordianFactory
      If a factory was agreed
      GordianSymCipher[2]
      If a pair of symCiphers was agreed
      GordianStreamCipher[2]
      If a pair of streamCiphers was agreed
      GordianKeySet
      If a keySet was agreed
      byte[]
      If a defined length byte array was agreed
      GordianException
      If the agreement was rejected.
      Throws:
      GordianException - on error
    • getFactoryResult

      GordianFactory getFactoryResult()
      Obtain factory result.
      Returns:
      the result if it is available as a factory, otherwise null
    • getKeySetResult

      GordianKeySet getKeySetResult()
      Obtain keySet result.
      Returns:
      the result if it is available as a keySet, otherwise null
    • getSymCipherPairResult

      GordianSymCipher[] getSymCipherPairResult()
      Obtain symCipherPair result.
      Returns:
      the result if it is available as a symCipherPair, otherwise null
    • getStreamCipherPairResult

      GordianStreamCipher[] getStreamCipherPairResult()
      Obtain streamCipherPair result.
      Returns:
      the result if it is available as a streamCipherPair, otherwise null
    • getByteArrayResult

      byte[] getByteArrayResult()
      Obtain byteArray result.
      Returns:
      the result if it is available as a byteArray, otherwise null
    • getRejectionResult

      GordianException getRejectionResult()
      Obtain Rejection result.
      Returns:
      the result if it is available as an exception, otherwise null
    • updateParams

      void updateParams(GordianAgreementParams pParams) throws GordianException
      Update parameters.
      Parameters:
      pParams - the updated parameters
      Throws:
      GordianException - on error
    • setError

      void setError(String pError) throws GordianException
      Reject the agreement with error message.
      Parameters:
      pError - the error
      Throws:
      GordianException - on error
    • isRejected

      boolean isRejected()
      Is the agreement rejected?.
      Returns:
      true/false
    • nextMessage

      byte[] nextMessage()
      Obtain the next message.
      Returns:
      the next message (if any)