Beispiel #1
0
 public static Asn1GeneralizedTime FromRawData(Byte[] rawData)
 {
     if (rawData[0] != (Byte)Asn1Type.Generalizedtime)
     {
         //throw new Asn1InvalidTagException("Invalid Tag");
     }
     Asn1GeneralizedTime asn1GeneralizedTime = new Asn1GeneralizedTime();
     asn1GeneralizedTime.tagName = "Generalized Time";
     asn1GeneralizedTime.RawData = rawData;
     return asn1GeneralizedTime;
 }
Beispiel #2
0
        static String DecodeGeneralizedTime(Asn1Reader asn)
        {
            DateTime dt = Asn1GeneralizedTime.Decode(asn);

            return(dt.ToShortDateString() + " " + dt.ToShortTimeString());
        }
Beispiel #3
0
 static void Init(Asn1Data asn1Data, Asn1GeneralizedTime asn1GeneralizedTime)
 {
     asn1GeneralizedTime.Tag     = asn1Data.Tag;
     asn1GeneralizedTime.TagName = asn1Data.TagName;
     asn1GeneralizedTime.RawData = Asn1Parser.GetTagRawData(asn1Data);
 }
Beispiel #4
0
 static Asn1Data Decode(Asn1Data asn1Data, Asn1GeneralizedTime asn1GeneralizedTime)
 {
     Init(asn1Data, asn1GeneralizedTime);
     asn1GeneralizedTime.tagValue = DateTimeUtils.Decode(asn1Data);
     return(asn1Data);
 }
Beispiel #5
0
 static void Init(Asn1Reader asn1Reader, Asn1GeneralizedTime asn1GeneralizedTime)
 {
     asn1GeneralizedTime.Tag = asn1Reader.Tag;
     asn1GeneralizedTime.TagName = asn1Reader.TagName;
     asn1GeneralizedTime.RawData = Asn1ReaderT.GetTagRawData(asn1Reader);
 }
Beispiel #6
0
 static Asn1Reader Decode(Asn1Reader asn1Reader, Asn1GeneralizedTime asn1GeneralizedTime)
 {
     Init(asn1Reader, asn1GeneralizedTime);
     asn1GeneralizedTime.tagValue = DateTimeUtils.Decode(asn1Reader);
     return asn1Reader;
 }