37#include <CryptnoxWallet.h>
41#define PN532_SS_PIN (10U)
47#define DEMO_PIN "000000000"
99 if (!
wallet.connect(session)) {
101 wallet.disconnect(session);
106 if (!
wallet.verifyPin(session,
107 reinterpret_cast<const uint8_t*
>(
DEMO_PIN),
113 serialAdapter.println(
F(
"PIN rejected — halting to protect retry counter"));
114 wallet.disconnect(session);
119 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.
#define DEMO_PIN
Demo PIN used by this example. Must match the PIN that the card was initialised with (4–9 ASCII digit...
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.
Holds cryptographic session state for reentrant secure channel operations.