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

Side by Side Diff: src/platform/vboot_reference/include/utility.h

Issue 553023: RSA signature verification and SHA-1/256/512 reference implementation for verified boot. (Closed)
Patch Set: Fixes. Created 10 years, 10 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
(Empty)
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
3 * found in the LICENSE file.
4 */
5
6 /* Helper functions/wrappers for memory allocations, manipulation and
7 * comparison.
8 */
9
10 #ifndef VBOOT_REFERENCE_UTILITY_H_
11 #define VBOOT_REFERENCE_UTILITY_H_
12
13 #include <string.h>
14
15 /* Allocate [size] bytes and return a pointer to the allocated memory. Abort
16 * on error.
17 */
18 void* Malloc(size_t size);
19
20 /* Free memory pointed by [ptr] previously allocated by Malloc(). */
21 void Free(void* ptr);
22
23 /* Copy [n] bytes from [src] to [dest]. */
24 void* Memcpy(void* dest, const void* src, size_t n);
25
26 /* Compare [n] bytes starting at [s1] with [s2] and return 1 if they match,
27 * 0 if they don't. Time taken to perform the comparison is only dependent on
28 * [n] and not on the relationship of the match between [s1] and [s2].
29 */
30 int SafeMemcmp(const void* s1, const void* s2, size_t n);
31
32 #endif /* VBOOT_REFERENCE_UTILITY_H_ */
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698