Esempio n. 1
0
        public static AsnAlgorithmIdentifier Decode(byte[] source, ref int pos)
        {
            AsnAlgorithmIdentifier instance = new AsnAlgorithmIdentifier();

            pos++;

            long len = instance.GetLength(source, ref pos);

            instance.algorithmID = AsnOid.Decode(source, ref pos);
            instance.parameters  = AsnNull.Decode(source, ref pos);

            return(instance);
        }
Esempio n. 2
0
        public static AsnAttributeTypeAndValue Decode(byte[] source, ref int pos)
        {
            AsnAttributeTypeAndValue instance = new AsnAttributeTypeAndValue();

            // skip the 0x30 (SEQUENCE)
            pos++;

            long length = instance.GetLength(source, ref pos);

            instance.elements.Add(AsnOid.Decode(source, ref pos));
            instance.elements.Add(AsnString.Decode(source, ref pos));

            return(instance);
        }
Esempio n. 3
0
        public static AsnExtension Decode(byte[] source, ref int pos)
        {
            AsnExtension instance = new AsnExtension();

            pos++;

            long len = instance.GetLength(source, ref pos);

            instance.extnID = AsnOid.Decode(source, ref pos);

            if (source[pos] == 0x1)
            {
                instance.critical = AsnBoolean.Decode(source, ref pos);
            }

            instance.extnValue = AsnOctetstring.Decode(source, ref pos);

            return(instance);
        }