GetInstance() 공개 정적인 메소드

public static GetInstance ( Asn1TaggedObject obj, bool isExplicit ) : PKMacValue
obj Asn1TaggedObject
isExplicit bool
리턴 PKMacValue
예제 #1
0
        private PopoPrivKey(Asn1TaggedObject obj)
        {
            this.tagNo = obj.TagNo;

            switch (tagNo)
            {
            case thisMessage:
                this.obj = DerBitString.GetInstance(obj, false);
                break;

            case subsequentMessage:
                this.obj = SubsequentMessage.ValueOf(DerInteger.GetInstance(obj, false).Value.IntValue);
                break;

            case dhMAC:
                this.obj = DerBitString.GetInstance(obj, false);
                break;

            case agreeMAC:
                this.obj = PKMacValue.GetInstance(obj, false);
                break;

            case encryptedKey:
                this.obj = EnvelopedData.GetInstance(obj, false);
                break;

            default:
                throw new ArgumentException("unknown tag in PopoPrivKey", "obj");
            }
        }
예제 #2
0
        private PopoPrivKey(Asn1TaggedObject obj)
        {
            //IL_0094: Unknown result type (might be due to invalid IL or missing references)
            tagNo = obj.TagNo;
            switch (tagNo)
            {
            case 0:
                this.obj = DerBitString.GetInstance(obj, isExplicit: false);
                break;

            case 1:
                this.obj = SubsequentMessage.ValueOf(DerInteger.GetInstance(obj, isExplicit: false).Value.IntValue);
                break;

            case 2:
                this.obj = DerBitString.GetInstance(obj, isExplicit: false);
                break;

            case 3:
                this.obj = PKMacValue.GetInstance(obj, isExplicit: false);
                break;

            case 4:
                this.obj = EnvelopedData.GetInstance(obj, explicitly: false);
                break;

            default:
                throw new ArgumentException("unknown tag in PopoPrivKey", "obj");
            }
        }
예제 #3
0
        private PopoPrivKey(Asn1TaggedObject obj)
        {
            this.tagNo = obj.TagNo;
            switch (this.tagNo)
            {
            case 0:
                this.obj = DerBitString.GetInstance(obj, false);
                return;

            case 1:
                this.obj = SubsequentMessage.ValueOf(DerInteger.GetInstance(obj, false).Value.IntValue);
                return;

            case 2:
                this.obj = DerBitString.GetInstance(obj, false);
                return;

            case 3:
                this.obj = PKMacValue.GetInstance(obj, false);
                return;

            case 4:
                this.obj = EnvelopedData.GetInstance(obj, false);
                return;

            default:
                throw new ArgumentException("unknown tag in PopoPrivKey", "obj");
            }
        }
예제 #4
0
        private PopoSigningKeyInput(Asn1Sequence seq)
        {
            Asn1Encodable asn1Encodable = seq[0];

            if (asn1Encodable is Asn1TaggedObject)
            {
                Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)asn1Encodable;
                if (asn1TaggedObject.TagNo != 0)
                {
                    throw new ArgumentException("Unknown authInfo tag: " + asn1TaggedObject.TagNo, "seq");
                }
                this.sender = GeneralName.GetInstance(asn1TaggedObject.GetObject());
            }
            else
            {
                this.publicKeyMac = PKMacValue.GetInstance(asn1Encodable);
            }
            this.publicKey = SubjectPublicKeyInfo.GetInstance(seq[1]);
        }
예제 #5
0
        private PopoSigningKeyInput(Asn1Sequence seq)
        {
            Asn1Encodable authInfo = (Asn1Encodable)seq[0];

            if (authInfo is Asn1TaggedObject)
            {
                Asn1TaggedObject tagObj = (Asn1TaggedObject)authInfo;
                if (tagObj.TagNo != 0)
                {
                    throw new ArgumentException("Unknown authInfo tag: " + tagObj.TagNo, "seq");
                }
                sender = GeneralName.GetInstance(tagObj.GetObject());
            }
            else
            {
                publicKeyMac = PKMacValue.GetInstance(authInfo);
            }

            publicKey = SubjectPublicKeyInfo.GetInstance(seq[1]);
        }
예제 #6
0
        private PopoSigningKeyInput(Asn1Sequence seq)
        {
            //IL_003f: Unknown result type (might be due to invalid IL or missing references)
            Asn1Encodable asn1Encodable = seq[0];

            if (asn1Encodable is Asn1TaggedObject)
            {
                Asn1TaggedObject asn1TaggedObject = (Asn1TaggedObject)asn1Encodable;
                if (asn1TaggedObject.TagNo != 0)
                {
                    throw new ArgumentException(string.Concat((object)"Unknown authInfo tag: ", (object)asn1TaggedObject.TagNo), "seq");
                }
                sender = GeneralName.GetInstance(asn1TaggedObject.GetObject());
            }
            else
            {
                publicKeyMac = PKMacValue.GetInstance(asn1Encodable);
            }
            publicKey = SubjectPublicKeyInfo.GetInstance(seq[1]);
        }
예제 #7
0
 public static PKMacValue GetInstance(Asn1TaggedObject obj, bool isExplicit)
 {
     return(PKMacValue.GetInstance(Asn1Sequence.GetInstance(obj, isExplicit)));
 }