Example #1
0
        public KEKIdentifier(
            ASN1Sequence seq)
        {
            keyIdentifier = (ASN1OctetString)seq.getObjectAt(0);

            switch (seq.size())
            {
            case 1:
                break;

            case 2:
                if (seq.getObjectAt(1) is DERGeneralizedTime)
                {
                    date = (DERGeneralizedTime)seq.getObjectAt(1);
                }
                else
                {
                    other = OtherKeyAttribute.getInstance(seq.getObjectAt(2));
                }
                break;

            case 3:
                date  = (DERGeneralizedTime)seq.getObjectAt(1);
                other = OtherKeyAttribute.getInstance(seq.getObjectAt(2));
                break;

            default:
                throw new ArgumentException("Invalid KEKIdentifier");
            }
        }
Example #2
0
 public KEKIdentifier(
     byte[]              keyIdentifier,
     DERGeneralizedTime date,
     OtherKeyAttribute other)
 {
     this.keyIdentifier = new DEROctetString(keyIdentifier);
     this.date          = date;
     this.other         = other;
 }
Example #3
0
 public RecipientKeyIdentifier(
     ASN1OctetString subjectKeyIdentifier,
     DERGeneralizedTime date,
     OtherKeyAttribute other)
 {
     this.subjectKeyIdentifier = subjectKeyIdentifier;
     this.date  = date;
     this.other = other;
 }