Interface TlsAgreement

    • Method Detail

      • generateEphemeral

        byte[] generateEphemeral()
                          throws java.io.IOException
        Generate 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.IOException
        Pass 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.