21 #define MAX_ELAPSED_TIME 0x7fffffff
27 boolean init(
int eepromAddress);
68 boolean buildChallenge(
byte* challengeBytes, uint32_t mS_sinceLastConnection);
98 boolean cmpToResult(
const byte* response, uint16_t len);
99 int CHAP_EEPROM_Address;
101 boolean disableEEPROM;
102 const static uint8_t powerCycleSize;
103 const static uint8_t timerSize;
104 const static uint8_t counterSize;
105 uint16_t connectionCounter;
106 uint16_t powerCycles;
110 uint8_t *hashChallenge(
byte *challenge);
120 uint16_t readPowerCycles(
int powerCycleAdd);
boolean buildChallenge(byte *challengeBytes, uint32_t mS_sinceLastConnection)
buildChallenge – NOTE: each call to this method increments the connection counter!...
static const uint8_t challengeHashByteSize
uint8_t eeprom_read(int address)
static const uint8_t PowerCyclesOffset
boolean init(int eepromAddress)
static void eeprom_write(int address, uint8_t value)
unsigned int readSecretKey(byte *bRtn, int keyAdd)
boolean checkMsgHash(const byte *msgHash, uint16_t len)
Converts msgHash from hex Digits to bytes and then compares the resulting byte[] with the current has...
static const uint8_t maxKeySize
void setDebugStream(Print *out)
static const uint8_t challengeByteSize
static const uint8_t msgHashByteSize
static void resetPowerCycles(int eepromAddress=0)
Use this call to reset the power cycles to 0xffff Then remove the call from the code for normal opera...
void printBytesInHex(Print *out, const byte *b, size_t len)
void putLongToHash(uint32_t l)
static const uint8_t KeyOffset
void setSecretKey(byte *key, int len)
void reverseBytes(byte *b, int len)
void putBytesToHash(byte *b, int len)
void putByteToHash(byte b)