static String DecodeBMPString(Asn1Reader asn)
 {
     return(Encoding.BigEndianUnicode.GetString(asn.RawData, asn.PayloadStartOffset, asn.PayloadLength));
 }
        static String DecodeGeneralizedTime(Asn1Reader asn)
        {
            var dt = new Asn1GeneralizedTime(asn).Value;

            return(dt.ToShortDateString() + " " + dt.ToShortTimeString());
        }
 static String DecodeUTF8String(Asn1Reader asn)
 {
     return(Encoding.UTF8.GetString(asn.RawData, asn.PayloadStartOffset, asn.PayloadLength));
 }
 static String DecodeAsciiString(Asn1Reader asn)
 {
     return(Encoding.ASCII.GetString(asn.RawData, asn.PayloadStartOffset, asn.PayloadLength));
 }
 /// <summary>
 /// Initializes a new instance of the <strong>ASN1</strong> class from an existing
 /// <strong>ASN1</strong> object.
 /// </summary>
 /// <param name="asn">An existing <strong>ASN1</strong> object.</param>
 /// <remarks>
 ///		This constructor creates a copy of a current position of an existing <strong>ASN1</strong> object.
 /// </remarks>
 public Asn1Reader(Asn1Reader asn) : this(asn.GetTagRawData())
 {
 }