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

Side by Side Diff: vboot_firmware/lib/cryptolib/include/sha.h

Issue 2833012: Move all system includes in vboot_firmware to sysincludes.h (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: Oops, forgot the new header Created 10 years, 6 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
« no previous file with comments | « vboot_firmware/lib/cryptolib/include/rsa.h ('k') | vboot_firmware/lib/cryptolib/rsa_utility.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /* SHA-1, 256 and 512 functions. */ 6 /* SHA-1, 256 and 512 functions. */
7 7
8 #ifndef VBOOT_REFERENCE_SHA_H_ 8 #ifndef VBOOT_REFERENCE_SHA_H_
9 #define VBOOT_REFERENCE_SHA_H_ 9 #define VBOOT_REFERENCE_SHA_H_
10 10
11 #ifndef VBOOT_REFERENCE_CRYPTOLIB_H_ 11 #ifndef VBOOT_REFERENCE_CRYPTOLIB_H_
12 #error "Do not include this file directly. Use cryptolib.h instead." 12 #error "Do not include this file directly. Use cryptolib.h instead."
13 #endif 13 #endif
14 14
15 #include <stdint.h> 15 #include "sysincludes.h"
16 16
17 #define SHA1_DIGEST_SIZE 20 17 #define SHA1_DIGEST_SIZE 20
18 #define SHA1_BLOCK_SIZE 64 18 #define SHA1_BLOCK_SIZE 64
19 19
20 #define SHA256_DIGEST_SIZE 32 20 #define SHA256_DIGEST_SIZE 32
21 #define SHA256_BLOCK_SIZE 64 21 #define SHA256_BLOCK_SIZE 64
22 22
23 #define SHA512_DIGEST_SIZE 64 23 #define SHA512_DIGEST_SIZE 64
24 #define SHA512_BLOCK_SIZE 128 24 #define SHA512_BLOCK_SIZE 128
25 25
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 uint8_t* DigestFile(char* input_file, int sig_algorithm); 119 uint8_t* DigestFile(char* input_file, int sig_algorithm);
120 120
121 /* Returns the appropriate digest of [buf] of length 121 /* Returns the appropriate digest of [buf] of length
122 * [len] based on the signature [algorithm]. 122 * [len] based on the signature [algorithm].
123 * Caller owns the returned digest and must free it. 123 * Caller owns the returned digest and must free it.
124 */ 124 */
125 uint8_t* DigestBuf(const uint8_t* buf, uint64_t len, int sig_algorithm); 125 uint8_t* DigestBuf(const uint8_t* buf, uint64_t len, int sig_algorithm);
126 126
127 127
128 #endif /* VBOOT_REFERENCE_SHA_H_ */ 128 #endif /* VBOOT_REFERENCE_SHA_H_ */
OLDNEW
« no previous file with comments | « vboot_firmware/lib/cryptolib/include/rsa.h ('k') | vboot_firmware/lib/cryptolib/rsa_utility.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698