Esempio n. 1
0
        public static ASN1 AlgorithmIdentifier(string oid, ASN1 parameters)
        {
            ASN1 aSN = new ASN1(48);

            aSN.Add(ASN1Convert.FromOid(oid));
            aSN.Add(parameters);
            return(aSN);
        }
Esempio n. 2
0
        static public ASN1 AlgorithmIdentifier(string oid)
        {
            ASN1 ai = new ASN1(0x30);

            ai.Add(ASN1Convert.FromOid(oid));
            ai.Add(new ASN1(0x05));                     // NULL
            return(ai);
        }
Esempio n. 3
0
        static public ASN1 AlgorithmIdentifier(string oid, ASN1 parameters)
        {
            ASN1 ai = new ASN1(0x30);

            ai.Add(ASN1Convert.FromOid(oid));
            ai.Add(parameters);
            return(ai);
        }
Esempio n. 4
0
        public static ASN1 AlgorithmIdentifier(string oid)
        {
            ASN1 asn = new ASN1(48);

            asn.Add(ASN1Convert.FromOid(oid));
            asn.Add(new ASN1(5));
            return(asn);
        }
Esempio n. 5
0
        public static ASN1 Attribute(string oid, ASN1 value)
        {
            ASN1 asn = new ASN1(0x30);

            asn.Add(ASN1Convert.FromOid(oid));
            asn.Add(new ASN1(0x31)).Add(value);
            return(asn);
        }
Esempio n. 6
0
        public static ASN1 Attribute(string oid, ASN1 value)
        {
            ASN1 aSN = new ASN1(48);

            aSN.Add(ASN1Convert.FromOid(oid));
            ASN1 aSN2 = aSN.Add(new ASN1(49));

            aSN2.Add(value);
            return(aSN);
        }
Esempio n. 7
0
        static public ASN1 Attribute(string oid, ASN1 value)
        {
            ASN1 attr = new ASN1(0x30);

            attr.Add(ASN1Convert.FromOid(oid));
            ASN1 aset = attr.Add(new ASN1(0x31));

            aset.Add(value);
            return(attr);
        }
Esempio n. 8
0
        public static ASN1 Attribute(string oid, ASN1 value)
        {
            ASN1 asn = new ASN1(48);

            asn.Add(ASN1Convert.FromOid(oid));
            ASN1 asn2 = asn.Add(new ASN1(49));

            asn2.Add(value);
            return(asn);
        }
Esempio n. 9
0
 internal Mono.Security.ASN1 GetASN1()
 {
     Mono.Security.ASN1 asn = new Mono.Security.ASN1(0x30);
     asn.Add(ASN1Convert.FromOid(this.contentType));
     if ((this.content != null) && (this.content.Count > 0))
     {
         asn.Add(this.content);
     }
     return(asn);
 }
Esempio n. 10
0
            internal ASN1 GetASN1()
            {
                ASN1 aSN = new ASN1(48);

                aSN.Add(ASN1Convert.FromOid(contentType));
                if (content != null && content.Count > 0)
                {
                    aSN.Add(content);
                }
                return(aSN);
            }
Esempio n. 11
0
            internal ASN1 GetASN1()
            {
                ASN1 asn = new ASN1(48);

                asn.Add(ASN1Convert.FromOid(this.contentType));
                if (this.content != null && this.content.Count > 0)
                {
                    asn.Add(this.content);
                }
                return(asn);
            }
Esempio n. 12
0
            internal ASN1 GetASN1()
            {
                // ContentInfo ::= SEQUENCE {
                ASN1 contentInfo = new ASN1(0x30);

                // contentType ContentType, -> ContentType ::= OBJECT IDENTIFIER
                contentInfo.Add(ASN1Convert.FromOid(contentType));
                // content [0] EXPLICIT ANY DEFINED BY contentType OPTIONAL
                if ((content != null) && (content.Count > 0))
                {
                    contentInfo.Add(content);
                }
                return(contentInfo);
            }