All Implemented Interfaces:
AgreementMethod, KeyInfoContent

public class AgreementMethodImpl extends EncryptionElementProxy implements KeyInfoContent, AgreementMethod
The implementation of the AgreementMethod interface. The element contains information about the key agreement algorithm for deriving the encryption key.
  • Field Details

  • Constructor Details

    • AgreementMethodImpl

      public AgreementMethodImpl(Document doc, KeyAgreementParameters keyAgreementParameter) throws XMLEncryptionException
      Constructor AgreementMethodImpl for generating AgreementMethod from scratch based on KeyAgreementParameters. The constructor generates KeyDerivationMethod if given and OriginatorKeyInfo based on originator public key for ECDH-ES key agreement. It generates a placeholder element for RecipientKeyInfo. The recipient key info value must be set later.
      Parameters:
      doc - the Document in which AgreementMethod will be placed
      keyAgreementParameter - the KeyAgreementParameters from which AgreementMethod will be generated
      Throws:
      XMLEncryptionException - if the Key derivation algorithm is not supported or invalid parameters are given.
    • AgreementMethodImpl

      public AgreementMethodImpl(Document doc, String algorithm)
      Constructor AgreementMethodImpl for generating AgreementMethod from scratch based on algorithm URI. The constructor builds a placeholder element for KeyDerivationMethod, OriginatorKeyInfo and RecipientKeyInfo. The values for these elements must be set later.
      Parameters:
      algorithm - the algorithm URI for the key agreement algorithm
    • AgreementMethodImpl

      public AgreementMethodImpl(Element element) throws XMLSecurityException
      Constructor AgreementMethodImpl based on XML Element.
      Parameters:
      element - the XML Element containing AgreementMethod information
      Throws:
      XMLSecurityException - if the AgreementMethod element has invalid XML structure
  • Method Details