Beispiel #1
0
        public ASN1Encodable getInfo()
        {
            if (info is ASN1TaggedObject)
            {
                ASN1TaggedObject o = (ASN1TaggedObject)info;

                switch ((int)o.getTagNo())
                {
                case 1:
                    return(KeyAgreeRecipientInfo.getInstance(o, true));

                case 2:
                    return(KEKRecipientInfo.getInstance(o, true));

                case 3:
                    return(PasswordRecipientInfo.getInstance(o, true));

                case 4:
                    return(OtherRecipientInfo.getInstance(o, true));

                default:
                    throw new InvalidOperationException("unknown tag");
                }
            }

            return(KeyTransRecipientInfo.getInstance(info));
        }
Beispiel #2
0
 public RecipientInfo(
     OtherRecipientInfo info)
 {
     this.info = new DERTaggedObject(true, 4, info);
 }