2

Does anybody have any idea where the EDIPI / CII compression methodology, used in the PDF417 barcode (front of the CAC), is explained or documented?

The closest reference I found is this document: http://www.cnic.navy.mil/navycni/groups/public/@hq/@cacpmo/documents/document/cnicp_a282327.pdf but it doesn't really explain the compression - converting strings to base-32 doesn't seem to end up the same result.

Obviously a very esoteric question, but any help would be appreciated.

Thanks!

Andy
  • 3,141
  • 3
  • 27
  • 22

2 Answers2

1

I was having a similar problem, so I wrote this code.

Public function base32(stringin as string) as double
    ref = "0123456789abcdefghijklmnopqrstuv"
    stringin = lcase$(stringin)
    x& = 0
    if len(stringin) = 0 then base32 = 0: exit function
    for n% = len(stringin) to 1 step -1
       base& = (32 ^ num)
       if base& = 0 then base& = 1
       v = instr(1, ref, mid$(stringin, n%, 1)) - 1
       if v < 0 then base32 = 0: exit function  'invalid character detection
       x& = x& + (v * base&)
       num = num + 1
       next n%
    base32 = x&
end function

public function mildate(stringin as string) as string
    mildate = dateadd("d", base32(stringin), "01/01/1000")
end function
JasonD
  • 16,464
  • 2
  • 29
  • 44
0

I have a copy of the official DoD document that explains how the barcodes are laid out, but I believe it's on a restricted site. You and Matthew are correct that the compression involves converting base-32 numbers to digital, but only certain data elements are compressed, particularly anything that could be considered as personal info (SSN, birth date, and the like). Your best bet would to get a copy of the CAC Developer's Kit (CDK) via www.cac.mil.

  • what do you mean by restricted site? needs cac to access? or actually classified. I'm worried that SSN and other info is on my cac card and easily readable. – J. Win. May 26 '16 at 14:25