Imagine you are at a hotel where each lock to the rooms is controlled by Arduino with an NFC shield. When you arrive at your room and place the NFC card against the reader, Arduino will validate if it is indeed the correct card before releasing the lock.
In this recipe, we will create an Android application to write the room number on an NFC card encrypted with an AES algorithm.
We will encrypt the room door (padded left with
0 to have
16 as the length) with a 32-bit key and save the result to the tag:
NfcBookCh9Example5and package named
AndroidManifest.xmlfile is correctly ...