Beispiel #1
0
        static public ASN1 FromString(string rdn)
        {
            if (rdn == null)
            {
                throw new ArgumentNullException("rdn");
            }

            int  pos  = 0;
            ASN1 asn1 = new ASN1(0x30);

            while (pos < rdn.Length)
            {
                X520.AttributeTypeAndValue atv = ReadAttribute(rdn, ref pos);
                atv.Value = ReadValue(rdn, ref pos);

                ASN1 sequence = new ASN1(0x31);
                sequence.Add(atv.GetASN1());
                asn1.Add(sequence);
            }
            return(asn1);
        }