| 182 | |
| 183 | |
| 184 | void bench_arc4() |
| 185 | { |
| 186 | ARC4 enc; |
| 187 | enc.SetKey(key, 16); |
| 188 | |
| 189 | double start = current_time(); |
| 190 | |
| 191 | for(int i = 0; i < megs; i++) |
| 192 | enc.Process(cipher, plain, sizeof(plain)); |
| 193 | |
| 194 | double total = current_time() - start; |
| 195 | |
| 196 | double persec = 1 / total * megs; |
| 197 | |
| 198 | printf("ARC4 %d megs took %5.3f seconds, %6.2f MB/s\n", megs, total, |
| 199 | persec); |
| 200 | } |
| 201 | |
| 202 | |
| 203 | void bench_md5() |
no test coverage detected