Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
 }
Exemple #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);
            }
Exemple #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);
            }
Exemple #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);
            }