コード例 #1
0
        protected int getTaggedIntValue(Asn1Tagged tagVal)
        {
            var obj       = tagVal.taggedValue();
            var dataBytes = SupportClass.ToByteArray(((Asn1OctetString)obj).byteValue());

            var decodedData = new MemoryStream(dataBytes);
            var decoder     = new LBERDecoder();

            return((int)decoder.decodeNumeric(
                       decodedData,
                       dataBytes.Length));
        }
コード例 #2
0
        protected int getTaggedIntValue(Asn1Tagged tagvalue, GeneralEventField tagid)
        {
            Asn1Object obj = tagvalue.taggedValue();

            if ((int)tagid != tagvalue.getIdentifier().Tag)
            {
                throw new IOException("Unknown Tagged Data");
            }

            byte[]       dbytes = SupportClass.ToByteArray(((Asn1OctetString)obj).byteValue());
            MemoryStream data   = new MemoryStream(dbytes);

            LBERDecoder dec = new LBERDecoder();

            int length = dbytes.Length;

            return((int)(dec.decodeNumeric(data, length)));
        }