| 125 | } |
| 126 | |
| 127 | template <class Context> void checkHmac(const FlashString& expectedHash) |
| 128 | { |
| 129 | auto hash = Context(String(FS_hmacKey)).calculate(FS_plainText); |
| 130 | auto hashText = Crypto::toString(hash); |
| 131 | Serial.print(Context::Engine::name); |
| 132 | Serial.print(": "); |
| 133 | Serial.println(hashText); |
| 134 | REQUIRE(hashText == expectedHash); |
| 135 | } |
| 136 | |
| 137 | template <class Context> void benchmarkHash(const String& expected) |
| 138 | { |