Thomas Stokkeland

RFID & HID Stuff - 33 bit generic


License: GNU General Public License version 3 (GPL v3) Click to view source

Copyright 2014 J T Stokkeland. Click to view license.

This came about due to the installation of an Axis A1001 entry system I was involved in, an attempt to pre-populate the Raw card data field for users was not easy. With the help of Peter from securitek, I was all to dig into and figure out a way, which resulted in this code piece. I am still not entirely sure of if this is the exact correct way, I was able to determine for sure that it is a 33 bit card we where uising, and thait it is is NOT like some other 33 bit standards out there which appear to use overlap in parity data checks, but rather similar to the old 26bit standard, data split in 15/16 bit bitwise parity check. I am no pro on how to code such, it is very likely the code could be much more elegant using some more efficient mathematics, but oh well - this will have to do for now. Thanks to PageMac.com for the basic info on this stuff - it has proven very hard to find anything good and complete.


Facility Code 7bit (0 to 63):

Card Codes 24bit (0 to 16777215) - one per line:

Results
(Take with a grain of salt, havent found a spec that confirms it is done correctly, it is basically based on trial and error from a small sample in a single facility code)
'.((int) $c) .' : '. encode_33bit_generic($c,$faccode)."\n"; ?>

 

[ Code ]     © Jon Thomas Stokkeland   [ Home ]   [ Information Technology ]   [ Linked In ]