Class EnvelopedData

  • All Implemented Interfaces:
    ASN1Encodable, Encodable

    public class EnvelopedData
    extends ASN1Object
    RFC 5652 EnvelopedData object.
     EnvelopedData ::= SEQUENCE {
         version CMSVersion,
         originatorInfo [0] IMPLICIT OriginatorInfo OPTIONAL,
         recipientInfos RecipientInfos,
         encryptedContentInfo EncryptedContentInfo,
         unprotectedAttrs [1] IMPLICIT UnprotectedAttributes OPTIONAL 
     }
     
    • Method Detail

      • getInstance

        public static EnvelopedData getInstance​(ASN1TaggedObject obj,
                                                boolean explicit)
        Return an EnvelopedData object from a tagged object.
        Parameters:
        obj - the tagged object holding the object we want.
        explicit - true if the object is meant to be explicitly tagged false otherwise.
        Throws:
        java.lang.IllegalArgumentException - if the object held by the tagged object cannot be converted.
      • getInstance

        public static EnvelopedData getInstance​(java.lang.Object obj)
        Return an EnvelopedData object from the given object.

        Accepted inputs:

        Parameters:
        obj - the object we want converted.
        Throws:
        java.lang.IllegalArgumentException - if the object cannot be converted.
      • getRecipientInfos

        public ASN1Set getRecipientInfos()
      • getUnprotectedAttrs

        public ASN1Set getUnprotectedAttrs()
      • calculateVersion

        public static int calculateVersion​(OriginatorInfo originatorInfo,
                                           ASN1Set recipientInfos,
                                           ASN1Set unprotectedAttrs)