pfodParser 5.0.1 The pfodParser library is handles commands sent from the Android pfodApp, pfodApp supports WiFi, BLE, Bluetooth and SMS connections

Public Member Functions | List of all members
pfodMACClient Class Reference

pfodMACClient for Arduino Updates power cycles, builds the Challenge, keeps track in message counts and hashes and check message hashes It uses upto 19 bytes of EEPROM starting from the address passed to init() More...

`#include <pfodMACClient.h>`

## Public Member Functions
| pfodMACClient ()
boolean | init ()
void | setSecretKey (byte *key, int len)
void | setDebugStream (Print *out)
boolean | isValid ()
boolean | isBigEndian ()
void | printBytesInHex (Print *out, const byte *b, size_t len)
void | initHash ()
void | putByteToHash (byte b)
void | putBytesToHash (byte *b, int len)
void | putLongToHash (uint32_t l)
void | finishHash ()
byte * | getHashedResult ()
boolean | checkMsgHash (const byte *msgHash, uint16_t len)
| Converts msgHash from hex Digits to bytes and then compares the resulting byte[] with the current hash result. More...
void | reverseBytes (byte *b, int len)
unsigned char * | hashChallenge (byte *challenge)

## Detailed Description

pfodMACClient for Arduino Updates power cycles, builds the Challenge, keeps track in message counts and hashes and check message hashes It uses upto 19 bytes of EEPROM starting from the address passed to init()

Definition at line 21 of file pfodMACClient.h.

## Constructor & Destructor Documentation

## ◆ pfodMACClient()

pfodMACClient::pfodMACClient | ( |  | ) |

## Member Function Documentation

## ◆ checkMsgHash()

boolean pfodMACClient::checkMsgHash | ( | const byte * | msgHash,
|  | uint16_t | len
| ) |  |

Converts msgHash from hex Digits to bytes and then compares the resulting byte[] with the current hash result.

Parameters

  msgHash | null terminated ascii string of hex chars (0..9A..F) or (0..9a..f) this input is overwritten with the converted bytes
  hashSize | the number of bytes expected in the hash must be < length of msgHash since the converted bytes are store in that array.

## ◆ finishHash()

void pfodMACClient::finishHash | ( |  | ) |

## ◆ getHashedResult()

byte* pfodMACClient::getHashedResult | ( |  | ) |

## ◆ hashChallenge()

unsigned char* pfodMACClient::hashChallenge | ( | byte * | challenge | ) |

## ◆ init()

boolean pfodMACClient::init | ( |  | ) |

## ◆ initHash()

void pfodMACClient::initHash | ( |  | ) |

## ◆ isBigEndian()

boolean pfodMACClient::isBigEndian | ( |  | ) |

## ◆ isValid()

boolean pfodMACClient::isValid | ( |  | ) |

## ◆ printBytesInHex()

void pfodMACClient::printBytesInHex | ( | Print * | out,
|  | const byte * | b,
|  | size_t | len
| ) |  |

## ◆ putBytesToHash()

void pfodMACClient::putBytesToHash | ( | byte * | b,
|  | int | len
| ) |  |

## ◆ putByteToHash()

void pfodMACClient::putByteToHash | ( | byte | b | ) |

## ◆ putLongToHash()

void pfodMACClient::putLongToHash | ( | uint32_t | l | ) |

## ◆ reverseBytes()

void pfodMACClient::reverseBytes | ( | byte * | b,
|  | int | len
| ) |  |

## ◆ setDebugStream()

void pfodMACClient::setDebugStream | ( | Print * | out | ) |

## ◆ setSecretKey()

void pfodMACClient::setSecretKey | ( | byte * | key,
|  | int | len
| ) |  |