Class KeyInfoEnc

  • Direct Known Subclasses:
    OriginatorKeyInfo, RecipientKeyInfo

    public class KeyInfoEnc
    extends KeyInfo
    This class is the extension of the KeyInfo class. The KeyInfo implements XML structures defined in XML Signature standards, and this class extends it for handling XML Element types defined by the XML encryption standards, such as AgreementMethod.
    • Method Detail

      • add

        public void add​(AgreementMethod agreementMethod)
        Method add AgreementMethod to the KeyInfo
        Parameters:
        agreementMethod - the AgreementMethod to be added. The AgreementMethod must extend class ElementProxy
      • lengthAgreementMethod

        public int lengthAgreementMethod()
        Method lengthAgreementMethod
        Returns:
        the number of the AgreementMethod tags
      • itemAgreementMethod

        public AgreementMethod itemAgreementMethod​(int i)
                                            throws XMLSecurityException
        Method itemAgreementMethod
        Parameters:
        i - index of the AgreementMethod element
        Returns:
        the i(th) AgreementMethod proxy element or null if the index is too big
        Throws:
        XMLSecurityException - if the element with AgreementMethod exists but with wrong namespace
      • containsAgreementMethod

        public boolean containsAgreementMethod()
        Method containsAgreementMethod returns true if the KeyInfo contains a AgreementMethod node
        Returns:
        true if the KeyInfo contains a AgreementMethod node else false