| OLD | NEW |
| 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
| 3 * found in the LICENSE file. | 3 * found in the LICENSE file. |
| 4 */ | 4 */ |
| 5 | 5 |
| 6 #include <stdio.h> | 6 #include <stdio.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "cryptolib.h" |
| 9 #include "file_keys.h" | 10 #include "file_keys.h" |
| 10 #include "padding.h" | |
| 11 #include "rsa.h" | |
| 12 #include "rsa_utility.h" | |
| 13 #include "timer_utils.h" | 11 #include "timer_utils.h" |
| 14 #include "utility.h" | 12 #include "utility.h" |
| 15 | 13 |
| 16 #define FILE_NAME_SIZE 128 | 14 #define FILE_NAME_SIZE 128 |
| 17 #define NUM_OPERATIONS 100 /* Number of signature operations to time. */ | 15 #define NUM_OPERATIONS 100 /* Number of signature operations to time. */ |
| 18 | 16 |
| 19 int SpeedTestAlgorithm(int algorithm) { | 17 int SpeedTestAlgorithm(int algorithm) { |
| 20 int i, key_size; | 18 int i, key_size; |
| 21 int error_code = 0; | 19 int error_code = 0; |
| 22 double speed, msecs; | 20 double speed, msecs; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 85 |
| 88 int main(int argc, char* argv[]) { | 86 int main(int argc, char* argv[]) { |
| 89 int i; | 87 int i; |
| 90 int error_code = 0; | 88 int error_code = 0; |
| 91 for (i = 0; i < kNumAlgorithms; ++i) { | 89 for (i = 0; i < kNumAlgorithms; ++i) { |
| 92 if(SpeedTestAlgorithm(i)) | 90 if(SpeedTestAlgorithm(i)) |
| 93 error_code = 1; | 91 error_code = 1; |
| 94 } | 92 } |
| 95 return error_code; | 93 return error_code; |
| 96 } | 94 } |
| OLD | NEW |