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 program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program, Click Here for full license details. If not, see http://www.gnu.org/licenses/.
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.
(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"; ?>