MCPcopy Create free account
hub / github.com/SmingHub/Sming / benchmarkHmac

Method benchmarkHmac

tests/HostTests/modules/Network/Crypto.cpp:149–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

147 }
148
149 template <class Context> void benchmarkHmac(const String& expected)
150 {
151 MicroTimes times(Context::Engine::name);
152 for(unsigned i = 0; i < iterations; ++i) {
153 times.start();
154 auto hash = Context(hmacKey).calculate(plainText);
155 times.update();
156 TEST_ASSERT(Crypto::toString(hash) == expected);
157 }
158 Serial.println(times);
159 }
160
161 void benchmarkFunction(const String& title, Delegate<void()> func)
162 {

Callers

nothing calls this directly

Calls 6

printlnMethod · 0.80
ContextClass · 0.50
toStringFunction · 0.50
startMethod · 0.45
calculateMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected