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

Method benchmarkHash

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

Source from the content-addressed store, hash-verified

135 }
136
137 template <class Context> void benchmarkHash(const String& expected)
138 {
139 MicroTimes times(Context::Engine::name);
140 for(unsigned i = 0; i < iterations; ++i) {
141 times.start();
142 auto hash = Context().calculate(plainText);
143 times.update();
144 TEST_ASSERT(Crypto::toString(hash) == expected);
145 }
146 Serial.println(times);
147 }
148
149 template <class Context> void benchmarkHmac(const String& expected)
150 {

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