|
cryptnox-sdk-arduino 1.0.0
Arduino library for Cryptnox Hardware Wallet
|
#include <CryptnoxWallet.h>#include <SPI.h>Go to the source code of this file.
Macros | |
| #define | PN532_SS_PIN (10U) |
| SPI slave-select (CS) pin connected to the PN532 module. | |
Functions | |
| PN532Adapter | nfc (serialAdapter, PN532_SS_PIN, &SPI) |
| PN532 transport adapter over SPI. | |
| void | setup () |
| Arduino setup hook. | |
| void | loop () |
| Arduino main loop. | |
Variables | |
| ArduinoLoggerAdapter | serialAdapter |
Arduino logger adapter — emits SDK diagnostics on Serial. | |
| ArduinoCryptoProvider | cryptoProvider |
| Crypto provider (AES / SHA / micro-ecc / TRNG bridge for Arduino). | |
| ArduinoPlatform | platform |
| Platform adapter (Arduino blocking delay). | |
| CryptnoxWallet | wallet (nfc, serialAdapter, cryptoProvider, platform) |
| High-level Cryptnox wallet wiring the four adapters together. | |
| #define PN532_SS_PIN (10U) |
SPI slave-select (CS) pin connected to the PN532 module.
Definition at line 31 of file Connect.ino.
Referenced by nfc().
| void loop | ( | ) |
Arduino main loop.
One full secure-channel session per iteration:
true the channel is mathematically established (session.aesKey, session.macKey, session.iv are populated and authenticated against the card).The 1 s delay between iterations gives time to remove/replace the card and keeps the Serial output readable.
Definition at line 88 of file Connect.ino.
References CW_CardInfo::email, F, CW_CardInfo::name, serialAdapter, and wallet.
| PN532Adapter nfc | ( | serialAdapter | , |
| PN532_SS_PIN | , | ||
| & | SPI ) |
PN532 transport adapter over SPI.
References PN532_SS_PIN, and serialAdapter.
| void setup | ( | ) |
Arduino setup hook.
Brings up Serial, the SPI bus and the PN532 reader, then prints the PN532 firmware version as a sanity check that the reader is alive and speaking. Halts on init failure so the user can inspect the Serial output.
Definition at line 56 of file Connect.ino.
References F, nfc(), serialAdapter, and wallet.
| ArduinoCryptoProvider cryptoProvider |
Crypto provider (AES / SHA / micro-ecc / TRNG bridge for Arduino).
Definition at line 40 of file Connect.ino.
| ArduinoPlatform platform |
Platform adapter (Arduino blocking delay).
Definition at line 43 of file Connect.ino.
| ArduinoLoggerAdapter serialAdapter |
Arduino logger adapter — emits SDK diagnostics on Serial.
Definition at line 34 of file Connect.ino.
| CryptnoxWallet wallet(nfc, serialAdapter, cryptoProvider, platform) | ( | nfc | , |
| serialAdapter | , | ||
| cryptoProvider | , | ||
| platform | ) |
High-level Cryptnox wallet wiring the four adapters together.