| 143 | |
| 144 | |
| 145 | void 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 | |
| 165 | void bench_blowfish() |
no test coverage detected