27#include <CryptnoxWallet.h>
31#define PN532_SS_PIN (10U)
68 nfc.printFirmwareVersion();
91 if (
wallet.connect(session)) {
92 serialAdapter.println(
F(
"Card connected, secure channel established"));
95 if (
wallet.getCardInfo(session, &info)) {
101 serialAdapter.println(
F(
"getCardInfo failed (channel error or parse error)"));
104 serialAdapter.println(
F(
"Card not detected or secure channel failed"));
107 wallet.disconnect(session);
void setup()
Arduino setup function.
CryptnoxWallet wallet(nfc, serialAdapter, cryptoProvider, platform)
PN532Adapter nfc(serialAdapter, PN532_SS, &SPI)
ArduinoLoggerAdapter serialAdapter
ArduinoCryptoProvider cryptoProvider
void loop()
Arduino main loop.
#define PN532_SS_PIN
SPI slave-select (CS) pin connected to the PN532 module.
CW_CryptoProvider implementation for the Arduino UNO R4 (RA4M1).
CW_Logger implementation wrapping Arduino's HardwareSerial.
High-level interface for interacting with a Cryptnox Hardware Wallet over NFC.
CW_NfcTransport implementation over the Adafruit_PN532 driver.
Subset of the Cryptnox card info returned by APDU 0x80FA0000.
char name[CW_CARD_NAME_MAX_LEN+1U]
char email[CW_CARD_EMAIL_MAX_LEN+1U]
Holds cryptographic session state for reentrant secure channel operations.