Package org.bouncycastle.tls.crypto
Interface TlsAgreement
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TlsSecretcalculateSecret()Calculate the agreed secret based on the calculator's current state.byte[]generateEphemeral()Generate an ephemeral key pair, returning the encoding of the public key.voidreceivePeerValue(byte[] peerValue)Pass in the public key for the peer to the agreement calculator.
-
-
-
Method Detail
-
generateEphemeral
byte[] generateEphemeral() throws java.io.IOExceptionGenerate an ephemeral key pair, returning the encoding of the public key.- Returns:
- a byte encoding of the public key.
- Throws:
java.io.IOException- in case of error.
-
receivePeerValue
void receivePeerValue(byte[] peerValue) throws java.io.IOExceptionPass in the public key for the peer to the agreement calculator.- Parameters:
peerValue- a byte encoding of the peer public key.- Throws:
java.io.IOException- in case of error.
-
calculateSecret
TlsSecret calculateSecret() throws java.io.IOException
Calculate the agreed secret based on the calculator's current state.- Returns:
- the calculated secret.
- Throws:
java.io.IOException- in case of error.
-
-