Automated Code Generation for NFC-based Access Control