Announcement

Collapse
No announcement yet.

ID Data Formats

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ID Data Formats

    Whilst perusing a number of ID related issues sparked by other threads, I tripped over some info that might be of interest to people here. The American Association of Motor Vehicle Administrators publishes and their License and ID Card specifications, which gives complete technical information Driver's Licenses and ID cards layouts, including the standard data format for mag stripe and optical data encoded on the card.

    While I also found some references to the effect that not all states and provinces implement the standards (such as this software manufacturer's site) at least this is may be a step toward finding out exactly what a state has encoded on a given card.
    Thorn
    "If you can't be a good example, then you'll just have to be a horrible warning." - Catherine Aird

  • #2
    Re: ID Data Formats

    Cool webpage with a java app to decode an image of the 2D barcode on the back of many state/province IDs: http://turbulence.org/Works/swipe/barcode.html

    And their table that shows what data is encoded in the barcodes of many of these IDs: http://turbulence.org/Works/swipe/mainTable.html

    (Disclaimer: I don't think this site has been updated in a while, so the info might be out of date.)

    Comment


    • #3
      Re: ID Data Formats

      Originally posted by Thorn View Post
      Whilst perusing a number of ID related issues sparked by other threads, I tripped over some info that might be of interest to people here. The American Association of Motor Vehicle Administrators publishes and their License and ID Card specifications, which gives complete technical information Driver's Licenses and ID cards layouts, including the standard data format for mag stripe and optical data encoded on the card.

      While I also found some references to the effect that not all states and provinces implement the standards (such as this software manufacturer's site) at least this is may be a step toward finding out exactly what a state has encoded on a given card.
      I decompiled part of the code and here is just some of the info that may or may not be available on your drivers license swipe card:

      Code:
      // Decompiled by Jad v1.5.8c. Copyright 2001 Pavel Kouznetsov.
      // Jad home page: http://www.geocities.com/kpdus/jad.html
      // Decompiler options: packimports(3) 
      // Source File Name:   Evaluation.java
      
      package swipe.review;
      
      import java.io.File;
      import java.io.PrintStream;
      import java.text.DecimalFormat;
      import java.util.*;
      import javax.servlet.http.HttpServletRequest;
      
      // Referenced classes of package swipe.review:
      //            Review
      
      public class Evaluation
      {
          public static class Field
          {
      
              public boolean hasSeparateAccuracyCount()
              {
                  return formAccuracyName != null;
              }
      
              String formName;
              String tableName;
              String formAccuracyName;
      
              public Field(String s, String s1)
              {
                  this(s, s1, null);
              }
      
              public Field(String s, String s1, String s2)
              {
                  formName = s;
                  tableName = s1;
                  formAccuracyName = s2;
              }
          }
      
      
          private Evaluation(String s)
          {
              init();
              File file = new File(s);
              File file1 = new File(file.getPath() + "/accepted");
              File file2 = new File(file.getPath() + "/processed");
              List list = loadReviews(file1);
              System.out.println("loaded " + list.size() + " reviews.");
              totals = new HashMap();
              for(Iterator iterator = list.iterator(); iterator.hasNext();)
              {
                  Review review = (Review)iterator.next();
                  if(isValidWarehouse(review.warehouse))
                  {
                      Review review1 = (Review)totals.get(review.warehouse);
                      if(review1 == null)
                      {
                          review1 = new Review(review.warehouse);
                          totals.put(review.warehouse, review1);
                      }
                      review1.merge(review);
                  }
              }
      
              String s1;
              for(Iterator iterator1 = totals.keySet().iterator(); iterator1.hasNext(); System.out.println(totals.get(s1)))
              {
                  s1 = (String)iterator1.next();
                  System.out.println("total for " + s1);
              }
      
          }
      
          public static String getWarehouseName(String s)
          {
              getInstance();
              return (String)columns.get(s);
          }
      
          private void init()
          {
              warehouses = new ArrayList();
              columns = new HashMap();
              warehouses.add("cp");
              columns.put("cp", "ChoicePoint");
              warehouses.add("ax");
              columns.put("ax", "Acxiom");
              warehouses.add("lp");
              columns.put("lp", "LocatePlus");
              warehouses.add("ex");
              columns.put("ex", "Experian");
              addField(new Field("Name", "Name"));
              addField(new Field("Add", "Current Address"));
              addField(new Field("Add2", "Past Address"));
              addField(new Field("Dob", "Date of Birth"));
              addField(new Field("Telephone", "Telephone Number", "tel_accurate"));
              addField(new Field("Ss", "Social Security Number"));
              addField(new Field("alias", "Aliases", "alias_accurate"));
              addField(new Field("other_soc", "Other SSN", "other_soc_accurate"));
              addField(new Field("other_soc_name", "Other SSN Records", "other_soc_name_accurate"));
              addField(new Field("dl", "Other Drivers Licenses", "dl_accurate"));
              addField(new Field("address_list", "Other Addresses", "address_list_accurate"));
              addField(new Field("phone_list", "Other Phone Numbers", "phone_list_accurate"));
              addField(new Field("time_list", "Address History", "time_list_accurate"));
              addField(new Field("relatives_list", "Relatives/Roomates", "relatives_list_accurate"));
              addField(new Field("rel_dob_list", "Relative/Roomate DoB", "rel_dob_list_accurate"));
              addField(new Field("rel_ss_list", "Relative/Roomate SSN", "rel_ss_list_accurate"));
              addField(new Field("owners", "Property Owners", "owners_accurate"));
              addField(new Field("owners", "Property Values", "values_accurate"));
              addField(new Field("veh_list", "Vehicles", "veh_list_accurate"));
              addField(new Field("credit", "Credit Headers"));
              addField(new Field("credit", "Credit Header Name", "ch_name_accurate"));
              addField(new Field("credit", "Credit Header DoB", "ch_ob_accurate"));
              addField(new Field("credit", "Credit Header Gender", "ch_gender_accurate"));
              addField(new Field("credit", "Credit Header Address", "ch_add_accurate"));
              addField(new Field("credit", "Credit Header Phone", "ch_ph_accurate"));
              addField(new Field("credit_items", "Credit Items"));
              addField(new Field("credit_items", "Credit Item Names", "ci_names_accurate"));
              addField(new Field("credit_items", "Credit Item Dates", "ci_date_accurate"));
              addField(new Field("credit_items", "Credit Item Types", "ci_types_accurate"));
              addField(new Field("credit_items", "Credit Item Responsibilities", "ci_res_accurate"));
              addField(new Field("credit_items", "Credit Item Limits", "ci_limit_accurate"));
              addField(new Field("credit_items", "Credit Item Balances", "ci_balance_accurate"));
              addField(new Field("credit_items", "Credit Item Payments", "ci_pay_accurate"));
              addField(new Field("credit_items", "Credit Item Status", "ci_status_accurate"));
              addField(new Field("bank", "Bank Names", "bank_names_accurate"));
              addField(new Field("balance", "Balances", "balance_accurate"));
              addField(new Field("requests", "Credit Report Requests (%approved)", "requests_app"));
              addField(new Field("law", "Bankruptcies, Liens, and Judgements", "law_accurate"));
              addField(new Field("emp_name", "Employer Names", "emp_name_accurate"));
              addField(new Field("emp_add", "Employer Addresses", "emp_add_accurate"));
              addField(new Field("textarea", "Comments"));
          }
      
          private void addField(Field field)
          {
              if(fields == null)
                  fields = new ArrayList();
              fields.add(field);
          }
      
          public static Evaluation getInstance()
          {
              if(instance == null)
                  instance = new Evaluation("reviews");
              return instance;
          }
      
          public static String getContent(HttpServletRequest httpservletrequest)
          {
              Evaluation evaluation = getInstance();
              StringBuffer stringbuffer = new StringBuffer();
              stringbuffer.append("<table border=1 width=500>");
              stringbuffer.append("<tr> <th></th>");
              for(Iterator iterator = warehouses.iterator(); iterator.hasNext();)
              {
                  String s = (String)iterator.next();
                  if(s != null)
                  {
                      String s1 = (String)columns.get(s);
                      if(s1 != null)
                          stringbuffer.append("<th width=80> " + s1 + " </th>");
                  }
              }
      
              stringbuffer.append("</tr>");
              int i = warehouses.size();
              for(Iterator iterator1 = fields.iterator(); iterator1.hasNext();)
              {
                  Field field = (Field)iterator1.next();
                  if(field.tableName != "Comments")
                  {
                      stringbuffer.append("<tr>");
                      stringbuffer.append("<th align=right>" + field.tableName + "</th>");
                      try
                      {
                          for(Iterator iterator2 = warehouses.iterator(); iterator2.hasNext();)
                          {
                              String s2 = (String)iterator2.next();
                              Review review = (Review)evaluation.totals.get(s2);
                              if(review != null)
                              {
                                  if(field.hasSeparateAccuracyCount())
                                  {
                                      int j = review.getIntValue(field.formName);
                                      float f = review.getIntValueAvg(field.formName);
                                      int i1 = review.getIntValue(field.formAccuracyName);
                                      int k1 = -1;
                                      if(j > 0 && i1 > 0)
                                          k1 = (int)((100D * (double)(float)i1) / (double)(float)j);
                                      if(j >= 0)
                                      {
                                          stringbuffer.append("<td> " + df1.format(f));
                                          if(k1 >= 0)
                                              stringbuffer.append("&nbsp;&nbsp;&nbsp;<font color=red>" + k1 + "%</font>");
                                          stringbuffer.append(" </td>");
                                      } else
                                      {
                                          stringbuffer.append("<td> - </td>");
                                      }
                                  } else
                                  {
                                      int k = review.getResponseCount(field.formName);
                                      int l = review.getIntValue(field.formName);
                                      int j1 = -1;
                                      if(k > 0 && l > 0)
                                          j1 = (int)((100D * (double)(float)l) / (double)(float)k);
                                      if(k >= 0)
                                      {
                                          stringbuffer.append("<td> " + k);
                                          if(j1 >= 0)
                                              stringbuffer.append("&nbsp;&nbsp;&nbsp;<font color=red>" + j1 + "%</font>");
                                          stringbuffer.append(" </td>");
                                      } else
                                      {
                                          stringbuffer.append("<td> - </td>");
                                      }
                                  }
                              } else
                              {
                                  stringbuffer.append("<td> - </td>");
                              }
                          }
      
                      }
                      catch(Exception exception)
                      {
                          System.err.println("e: " + exception);
                          exception.printStackTrace();
                          stringbuffer.append("<td> - </td>");
                      }
                      stringbuffer.append("</tr>");
                  }
              }
      
              stringbuffer.append("</table>");
              return stringbuffer.toString();
          }
      
          public static List loadReviews(File file)
          {
              ArrayList arraylist = new ArrayList();
              if(file == null || !file.exists() || !file.isDirectory())
                  return arraylist;
              File afile[] = file.listFiles();
              for(int i = 0; i < afile.length; i++)
              {
                  Review review = Review.parseFile(afile[i]);
                  if(review != null)
                      arraylist.add(review);
              }
      
              return arraylist;
          }
      
          public static boolean isValidWarehouse(String s)
          {
              if(warehouses == null)
                  return false;
              System.out.println("isvalid:" + s);
              for(Iterator iterator = warehouses.iterator(); iterator.hasNext();)
                  if(s.equals((String)iterator.next()))
                      return true;
      
              System.out.println("no!");
              return false;
          }
      
          public static void main(String args[])
          {
              Evaluation evaluation = getInstance();
          }
      
          public static List warehouses;
          public static Map columns;
          public static final int tableWidth = 500;
          public static final int columnWidth = 80;
          private static Evaluation instance = null;
          private static List fields;
          public Map totals;
          static DecimalFormat df1;
      
          static 
          {
              df1 = new DecimalFormat();
              df1.setMaximumFractionDigits(1);
          }
      }
      Absolutely amazing, pay close attention to private void init().

      xor

      I can only imagine what would be in the comments section. Boy could you have fun with that. :-)
      Last edited by xor; May 14, 2008, 18:22.
      Just because you can doesn't mean you should. This applies to making babies, hacking, and youtube videos.

      Comment

      Working...
      X