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

Function bench_aes

extra/yassl/taocrypt/benchmark/benchmark.cpp:125–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123
124
125void bench_aes(bool show)
126{
127 AES_CBC_Encryption enc;
128 enc.SetKey(key, 16, iv);
129
130 double start = current_time();
131
132 for(int i = 0; i < megs; i++)
133 enc.Process(plain, cipher, sizeof(plain));
134
135 double total = current_time() - start;
136
137 double persec = 1 / total * megs;
138
139 if (show)
140 printf("AES %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total,
141 persec);
142}
143
144
145void bench_twofish()

Callers 1

mainFunction · 0.85

Calls 3

current_timeFunction · 0.85
SetKeyMethod · 0.45
ProcessMethod · 0.45

Tested by

no test coverage detected