protected int getTaggedIntValue(Asn1Tagged tagVal) { Asn1Object obj = tagVal.taggedValue(); byte[] dataBytes = SupportClass.ToByteArray(((Asn1OctetString) obj).byteValue()); MemoryStream decodedData = new MemoryStream(dataBytes); LBERDecoder decoder = new LBERDecoder(); return ((int) decoder.decodeNumeric( decodedData, dataBytes.Length)); }
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)); }