Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: src/platform/vboot_reference/tests/sha_benchmark.c

Issue 1574005: VBoot Reference: Refactor Part 2 - Crypto Libraries (Closed)
Patch Set: . Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "sha.h" 9 #include "cryptolib.h"
10 #include "timer_utils.h" 10 #include "timer_utils.h"
11 #include "utility.h" 11 #include "utility.h"
12 12
13 #define NUM_HASH_ALGORITHMS 3 13 #define NUM_HASH_ALGORITHMS 3
14 #define TEST_BUFFER_SIZE 4000000 14 #define TEST_BUFFER_SIZE 4000000
15 15
16 /* Table of hash function pointers and their description. */ 16 /* Table of hash function pointers and their description. */
17 typedef uint8_t* (*Hashptr) (const uint8_t*, uint64_t, uint8_t*); 17 typedef uint8_t* (*Hashptr) (const uint8_t*, uint64_t, uint8_t*);
18 typedef struct HashFxTable { 18 typedef struct HashFxTable {
19 Hashptr hash; 19 Hashptr hash;
(...skipping 28 matching lines...) Expand all
48 fprintf(stderr, "# %s Time taken = %u ms, Speed = %f Mbytes/sec\n", 48 fprintf(stderr, "# %s Time taken = %u ms, Speed = %f Mbytes/sec\n",
49 hash_functions[i].description, msecs, speed); 49 hash_functions[i].description, msecs, speed);
50 fprintf(stdout, "mbytes_per_sec_%s:%f\n", 50 fprintf(stdout, "mbytes_per_sec_%s:%f\n",
51 hash_functions[i].description, speed); 51 hash_functions[i].description, speed);
52 } 52 }
53 53
54 Free(digest); 54 Free(digest);
55 Free(buffer); 55 Free(buffer);
56 return 0; 56 return 0;
57 } 57 }
OLDNEW
« no previous file with comments | « src/platform/vboot_reference/tests/rsa_verify_benchmark.c ('k') | src/platform/vboot_reference/tests/sha_tests.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698