Class KeyAgreementKey

    • Constructor Detail

      • KeyAgreementKey

        public KeyAgreementKey​(SecretBuilder builder)
                        throws NoSuchSecretException
        Initialises the key with the given secret data.
        Parameters:
        builder - the builder object.
        Throws:
        NoSuchSecretException - if the secret could not be constructed from the builder.
    • Method Detail

      • getKeyAgreement

        public KeyAgreement getKeyAgreement​(String algorithm,
                                            AlgorithmParameterSpec parameterSpec)
        Obtains a key agreement protocol object initialized with this key.
        Parameters:
        algorithm - the key agreement algorithm, for instance "ECDH" for Elliptic Curve Diffie-Hellman.
        parameterSpec - the algorithm parameters.
        Returns:
        the initialized key agreement object.
        Throws:
        IllegalStateException - if this key object doesn't contain private key material.
      • getKeyAgreement

        public KeyAgreement getKeyAgreement​(String algorithm)
        Obtains a key agreement protocol object initialized with this key.
        Parameters:
        algorithm - the key agreement algorithm, for instance "ECDH" for Elliptic Curve Diffie-Hellman.
        Returns:
        the initialized key agreement object.
      • getKeyAgreement

        public KeyAgreement getKeyAgreement()
        Obtains a key agreement protocol object for this key.
        Returns:
        the initialized key agreement object.