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.
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:
Open Eclipse and create a new Android application project named
NfcBookCh9Example5and package named
Make sure the
AndroidManifest.xmlfile is correctly configured. Refer to the Requesting NFC permissions recipe in Chapter 1, Getting Started with NFC.
Add the following
<string name="dialog_waiting_tag">Waiting tag...</string> <string name="label_aes_key...