Exemplo n.º 1
0
        public RegistrationA(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader)
            : base(EFSOd, CSCA, AID, cardReader, new byte[] { 0xD0, 0x01 })
        {
            this.SetEncoding(this.GetTag("1,71|1,9F37").Value);

            this.A = this.DecodeString("1,71|1,81");                        // kenteken
            this.DocumentNumber = this.DecodeString("1,71|1,9F38");         // docNr
            this.C11            = this.DecodeString("1,71|1,A1|1,A2|1,83"); // naamHouder
            this.C12            = this.DecodeString("1,71|1,A1|1,A2|1,84"); // voorletters
            this.C13            = this.DecodeString("1,71|1,A1|1,A2|1,85"); // adresHouder
            this.C4             = this.DecodeString("1,71|1,A1|1,86");      // eigendom
            this.E = this.DecodeString("1,71|1,8A");                        // voertuigidentificatienr

            // Determine meldcode from the voertuigidentificatienr number (last 4 digits; digits!)
            this.A_Meldcode = EVR.Utils.Helper.ExtractMeldcode(this.E);

            this.D1 = this.DecodeString("1,71|1,A3|1,87");          // merk
            this.D2 = this.DecodeString("1,71|1,A3|1,88");          // type
            this.D3 = this.DecodeString("1,71|1,A3|1,89");          // handelsbenaming

            this.K  = this.DecodeString("1,71|1,8F");               // typegoedkeuringsnr
            this.F1 = this.DecodeString("1,71|1,A4|1,8B");          // techMaxMassa
            this.G  = this.DecodeString("1,71|1,8C");               // massaRijklaar
            this.S1 = this.DecodeString("1,71|1,A6|1,94");          // zitplaatsen
            this.S2 = this.DecodeString("1,71|1,A6|1,95");          // staanplaatsen
            this.P1 = this.DecodeString("1,71|1,A5|1,90");          // cilinderinhoud
            this.P2 = this.DecodeString("1,71|1,A5|1,91");          // vermogen
            this.P3 = this.DecodeString("1,71|1,A5|1,92");          // brandstofEU
            this.Q  = this.DecodeString("1,71|1,93");               // vermogenGedeeldRijklaar
        }
Exemplo n.º 2
0
        public RegistrationA(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader)
            : base(EFSOd, CSCA, AID, cardReader, new byte[] { 0xD0, 0x01 })
        {
            this.SetEncoding(this.GetTag("1,71|1,9F37").Value);

            this.A = this.DecodeString("1,71|1,81");                // kenteken
            this.DocumentNumber = this.DecodeString("1,71|1,9F38"); // docNr
            this.C11 = this.DecodeString("1,71|1,A1|1,A2|1,83");    // naamHouder
            this.C12 = this.DecodeString("1,71|1,A1|1,A2|1,84");    // voorletters
            this.C13 = this.DecodeString("1,71|1,A1|1,A2|1,85");    // adresHouder
            this.C4 = this.DecodeString("1,71|1,A1|1,86");          // eigendom
            this.E = this.DecodeString("1,71|1,8A");                // voertuigidentificatienr

            // Determine meldcode from the voertuigidentificatienr number (last 4 digits; digits!)
            this.A_Meldcode = EVR.Utils.Helper.ExtractMeldcode(this.E);

            this.D1 = this.DecodeString("1,71|1,A3|1,87");          // merk
            this.D2 = this.DecodeString("1,71|1,A3|1,88");          // type
            this.D3 = this.DecodeString("1,71|1,A3|1,89");          // handelsbenaming

            this.K = this.DecodeString("1,71|1,8F");                // typegoedkeuringsnr
            this.F1 = this.DecodeString("1,71|1,A4|1,8B");          // techMaxMassa
            this.G = this.DecodeString("1,71|1,8C");                // massaRijklaar
            this.S1 = this.DecodeString("1,71|1,A6|1,94");          // zitplaatsen
            this.S2 = this.DecodeString("1,71|1,A6|1,95");          // staanplaatsen
            this.P1 = this.DecodeString("1,71|1,A5|1,90");          // cilinderinhoud
            this.P2 = this.DecodeString("1,71|1,A5|1,91");          // vermogen
            this.P3 = this.DecodeString("1,71|1,A5|1,92");          // brandstofEU
            this.Q = this.DecodeString("1,71|1,93");                // vermogenGedeeldRijklaar
        }
Exemplo n.º 3
0
 /*
  * Constructor when nog DS and Signature are stored for a registration (ie Registration C at the moment)
  */
 public Registration(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader, byte[] FileID)
     : base(AID, cardReader, FileID)
 {
     this.EFSOd = EFSOd;
     this.CSCA  = CSCA;
     CreateSignature();
     CreateDocumentSigner();
 }
Exemplo n.º 4
0
 /*
  * Constructor when nog DS and Signature are stored for a registration (ie Registration C at the moment)
  */
 public Registration(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader, byte[] FileID)
     : base(AID, cardReader,FileID)
 {
     this.EFSOd = EFSOd;
     this.CSCA = CSCA;
     CreateSignature();
     CreateDocumentSigner();
 }
Exemplo n.º 5
0
 public RegistrationB(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader, System.Text.Encoding encoding)
     : base(EFSOd, CSCA, AID, cardReader, new byte[] { 0xD0, 0x11 })
 {
     this.CharacterSetEncoding = encoding;
     this.J  = this.DecodeString("1,72|1,98");           // voertuigCategorie
     this.R  = this.DecodeString("1,72|1,9F24");         // kleur
     this.V9 = this.DecodeString("1,72|1,B0|1,9F31");    // milKlasse
     this.F2 = this.DecodeString("1,72|1,A4|1,96");      // toegMaxMassa
     this.F3 = this.DecodeString("1,72|1,A4|1,97");      // toegMaxMassaComb
     this.T  = this.DecodeString("1,72|1,9F25");         // maxSnelheid
     this.O1 = this.DecodeString("1,72|1,AE|1,9B");      // trailerBreaked
     this.O2 = this.DecodeString("1,72|1,AE|1,9C");      // trailerUnBreaked
 }
Exemplo n.º 6
0
 public RegistrationB(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader, System.Text.Encoding encoding)
     : base(EFSOd, CSCA, AID, cardReader, new byte[] { 0xD0, 0x11 })
 {
     this.CharacterSetEncoding = encoding;
     this.J = this.DecodeString("1,72|1,98");            // voertuigCategorie
     this.R = this.DecodeString("1,72|1,9F24");          // kleur
     this.V9 = this.DecodeString("1,72|1,B0|1,9F31");    // milKlasse
     this.F2 = this.DecodeString("1,72|1,A4|1,96");      // toegMaxMassa
     this.F3 = this.DecodeString("1,72|1,A4|1,97");      // toegMaxMassaComb
     this.T = this.DecodeString("1,72|1,9F25");          // maxSnelheid
     this.O1 = this.DecodeString("1,72|1,AE|1,9B");      // trailerBreaked
     this.O2 = this.DecodeString("1,72|1,AE|1,9C");      // trailerUnBreaked
 }
Exemplo n.º 7
0
Arquivo: EFSOd.cs Projeto: steffex/eVR
        /// <summary>
        /// Het complete RDWSecurityObject in het SOD (waarde van tag ‘04’) opnieuw laten parsen.
        /// </summary>
        /// <param name="efSod"></param>
        /// <param name="oidORdataGroupHashValues"></param>
        /// <returns>TLV</returns>
        public TLV ParseEFSOD(EFSOd efSod, string oidORdataGroupHashValues)
        {
            if (string.IsNullOrEmpty(oidORdataGroupHashValues))
            {
                throw new ArgumentException("Argument should not be null or empty", "oidORdataGroupHashValues");
            }
            if (efSod == null)
            {
                return(null);
            }
            TLV          tlv = efSod.GetTag("1,30|1,A0|1,30|1,30|1,A0|1,04");
            MemoryStream ms  = new MemoryStream(tlv.Value);
            TLVList      l   = TLV.Parse(ms);

            return(l.getTag(oidORdataGroupHashValues));
        }
Exemplo n.º 8
0
        public RegistrationC(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader, Encoding encoding)
            : base(EFSOd, CSCA, AID, cardReader, new byte[] { 0xD0, 0x21 })
        {
            this.CharacterSetEncoding = encoding;
            this.CVOVersion           = this.DecodeBinary("1,BF8700|1,9F8701");
            this.B1 = this.DecodeString("1,BF8700|1,BF8710|1,9F8711"); // firstReg
            this.B2 = this.DecodeString("1,BF8700|1,BF8710|1,9F8712"); // firstRegEU
            this.I  = this.DecodeString("1,BF8700|1,BF8710|1,9F8713"); // tenaamstelling

            TLV           zippedXMLsTLV = this.GetTag("1,BF8700|1,BF8703|1,9F8705");
            int           i             = 1;
            List <string> cvos          = new List <string>();

            while (zippedXMLsTLV != null)
            {
                cvos.Add(Helper.GUnzip2(zippedXMLsTLV.Value));

                i++;
                zippedXMLsTLV = this.GetTag(string.Format("1,BF8700|{0},BF8703|1,9F8705", i));
            }
            this.CVOs = cvos.ToArray();
        }
Exemplo n.º 9
0
        public RegistrationC(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader, Encoding encoding)
            : base(EFSOd, CSCA, AID, cardReader, new byte[] { 0xD0, 0x21 })
        {
            this.CharacterSetEncoding = encoding;
            this.CVOVersion = this.DecodeBinary("1,BF8700|1,9F8701");
            this.B1 = this.DecodeString("1,BF8700|1,BF8710|1,9F8711"); // firstReg
            this.B2 = this.DecodeString("1,BF8700|1,BF8710|1,9F8712"); // firstRegEU
            this.I = this.DecodeString("1,BF8700|1,BF8710|1,9F8713"); // tenaamstelling

            TLV zippedXMLsTLV = this.GetTag("1,BF8700|1,BF8703|1,9F8705");
            int i = 1;
            List<string> cvos = new List<string>();

            while (zippedXMLsTLV != null)
            {
                cvos.Add(Helper.GUnzip2(zippedXMLsTLV.Value));

                i++;
                zippedXMLsTLV = this.GetTag(string.Format("1,BF8700|{0},BF8703|1,9F8705", i));
            }
            this.CVOs = cvos.ToArray();
        }
Exemplo n.º 10
0
Arquivo: EFAA.cs Projeto: steffex/eVR
 public EFAA(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader)
     : base(EFSOd, CSCA, AID, cardReader, new byte[] { 0x00, 0x0D })
 {
 }
Exemplo n.º 11
0
 /// <summary>
 /// Het complete RDWSecurityObject in het SOD (waarde van tag ‘04’) opnieuw laten parsen.
 /// </summary>
 /// <param name="efSod"></param>
 /// <param name="oidORdataGroupHashValues"></param>
 /// <returns>TLV</returns>
 public TLV ParseEFSOD(EFSOd efSod, string oidORdataGroupHashValues)
 {
     if (string.IsNullOrEmpty(oidORdataGroupHashValues))
     {
         throw new ArgumentException("Argument should not be null or empty", "oidORdataGroupHashValues");
     }
     if (efSod == null)
     {
         return null;
     }
     TLV tlv = efSod.GetTag("1,30|1,A0|1,30|1,30|1,A0|1,04");
     MemoryStream ms = new MemoryStream(tlv.Value);
     TLVList l = TLV.Parse(ms);
     return l.getTag(oidORdataGroupHashValues);
 }
Exemplo n.º 12
0
 public EFAA(EFSOd EFSOd, X509Certificate2 CSCA, byte[] AID, CardReader cardReader)
     : base(EFSOd, CSCA, AID, cardReader, new byte[] { 0x00, 0x0D })
 {
 }