MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / bench_twofish

Function bench_twofish

extra/yassl/taocrypt/benchmark/benchmark.cpp:145–162  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143
144
145void bench_twofish()
146{
147 Twofish_CBC_Encryption enc;
148 enc.SetKey(key, 16, iv);
149
150 double start = current_time();
151
152 for(int i = 0; i < megs; i++)
153 enc.Process(plain, cipher, sizeof(plain));
154
155 double total = current_time() - start;
156
157 double persec = 1 / total * megs;
158
159 printf("Twofish %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
160 persec);
161
162}
163
164
165void bench_blowfish()

Callers 1

mainFunction · 0.85

Calls 3

current_timeFunction · 0.85
SetKeyMethod · 0.45
ProcessMethod · 0.45

Tested by

no test coverage detected