First at all sorry for my bad English.
I would like to create a kind of lock with no internet connexion and a RTC inside.
The lock will open with a code 8 chars long. The chars can be from 0 to 9 and from A to D. (I use a 16 key keypad)
The main idea is to have a code generator that encrypt with this 14 chars (0-9 and A-D) a code that says to the lock : you will have to open from this date until this date. And because i want the code to work only with the serial of one lock the code have to be compatible only with the lock I create the code for.
So to resume :
I have a lock with a 16 keys that are 0-9 and A-D the last two are R for reset and V like run :)
The lock have a serial number could be 000 to 999
When I create the code the code have to contain on max 8 chars : the start date, end date and the serial of the lock.
I've tried some ideas like work with a base 14 or something like. Use a kind of offset from the a defined date that is the same on the lock and the generator and then use the difference from this date to create the start date. Use the serial of the lock to do a CRC so when the lock check the code if the CRC is not ok then it won't open.
Well as you see I'm getting lost so if you have a simple idea please help
Thanks a lot