Interface GordianAgreement
public interface GordianAgreement
Key Agreement Specification.
-
Method Summary
Modifier and TypeMethodDescriptionObtain the agreementParameters.byte[]Obtain byteArray result.Obtain factory result.Obtain keySet result.Obtain Rejection result.Obtain result.Obtain agreement status.Obtain streamCipherPair result.Obtain symCipherPair result.booleanIs the agreement rejected?.byte[]Obtain the next message.voidReject the agreement with error message.voidupdateParams(GordianAgreementParams pParams) Update parameters.
-
Method Details
-
getAgreementParams
GordianAgreementParams getAgreementParams()Obtain the agreementParameters.- Returns:
- the parameters
-
getStatus
GordianAgreementStatus getStatus()Obtain agreement status.- Returns:
- the agreement state
-
getResult
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
Update parameters.- Parameters:
pParams- the updated parameters- Throws:
GordianException- on error
-
setError
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)
-