|
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 | USE_SPI |
| #define | PN532_SS (10U) |
| SPI slave select (CS) pin for the PN532 module. | |
| #define | DEFAULT_PIN "000000000" |
| Default PIN code (ASCII digits). Must match the PIN used during card.init(). | |
| #define | DEFAULT_PIN_LEN (sizeof(DEFAULT_PIN) - 1U) |
Functions | |
| PN532Adapter | nfc (serialAdapter, PN532_SS, &SPI) |
| void | setup () |
| Arduino setup function. | |
| void | loop () |
| Arduino main loop. | |
Variables | |
| ArduinoLoggerAdapter | serialAdapter |
| ArduinoCryptoProvider | cryptoProvider |
| ArduinoPlatform | platform |
| CryptnoxWallet | wallet (nfc, serialAdapter, cryptoProvider, platform) |
| #define DEFAULT_PIN "000000000" |
Default PIN code (ASCII digits). Must match the PIN used during card.init().
Definition at line 75 of file BasicUsage.ino.
Referenced by loop().
| #define DEFAULT_PIN_LEN (sizeof(DEFAULT_PIN) - 1U) |
| #define PN532_SS (10U) |
SPI slave select (CS) pin for the PN532 module.
Definition at line 39 of file BasicUsage.ino.
Referenced by nfc().
| #define USE_SPI |
Definition at line 25 of file BasicUsage.ino.
| void loop | ( | ) |
Arduino main loop.
Demonstrates simplified card connection and processing:
Definition at line 117 of file BasicUsage.ino.
References CW_HASH_SIZE, CW_OK, CW_SIG_R_OFFSET, CW_SIG_S_OFFSET, CW_SIGN_CURR_K1, CW_SIGN_SIG_ECDSA_LOW_S, CW_SIGN_WITH_PIN, DEFAULT_PIN, DEFAULT_PIN_LEN, CW_SignResult::errorCode, F, CW_SignRequest::hash, CW_SignRequest::hashLength, HEX, CW_SignRequest::pin, CW_Utils::safe_memcpy(), CW_Utils::secure_wipe(), serialAdapter, CW_SignResult::signature, and wallet.
| PN532Adapter nfc | ( | serialAdapter | , |
| PN532_SS | , | ||
| & | SPI ) |
References PN532_SS, and serialAdapter.
Referenced by setup().
| void setup | ( | ) |
Arduino setup function.
Initializes the serial port for debugging, the selected bus, and the PN532 module.
Definition at line 88 of file BasicUsage.ino.
References F, serialAdapter, and wallet.
| ArduinoCryptoProvider cryptoProvider |
Definition at line 78 of file BasicUsage.ino.
| ArduinoPlatform platform |
Definition at line 79 of file BasicUsage.ino.
Referenced by CryptnoxWallet::CryptnoxWallet(), and CW_SecureChannel::CW_SecureChannel().
| ArduinoLoggerAdapter serialAdapter |
Definition at line 47 of file BasicUsage.ino.
| CryptnoxWallet wallet(nfc, serialAdapter, cryptoProvider, platform) | ( | nfc | , |
| serialAdapter | , | ||
| cryptoProvider | , | ||
| platform | ) |