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

Side by Side Diff: host/include/signature_digest.h

Issue 2815011: Remove unused files, and tidy the directory structure of the remaining ones. (Closed) Base URL: ssh://gitrw.chromium.org/vboot_reference.git
Patch Set: 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 | « host/include/file_keys.h ('k') | host/lib/file_keys.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 #ifndef VBOOT_REFERENCE_SIGNATURE_DIGEST_H_ 6 #ifndef VBOOT_REFERENCE_SIGNATURE_DIGEST_H_
7 #define VBOOT_REFERENCE_SIGNATURE_DIGEST_H_ 7 #define VBOOT_REFERENCE_SIGNATURE_DIGEST_H_
8 8
9 #include <inttypes.h> 9 #include <inttypes.h>
10 10
11 /* Returns a buffer with DigestInfo (which depends on [algorithm]) 11 /* Returns a buffer with DigestInfo (which depends on [algorithm])
12 * prepended to [digest]. 12 * prepended to [digest].
13 */ 13 */
14 uint8_t* prepend_digestinfo(int algorithm, uint8_t* digest); 14 uint8_t* PrependDigestInfo(int algorithm, uint8_t* digest);
15 15
16 /* Function that outputs the message digest of the contents of a buffer in a 16 /* Function that outputs the message digest of the contents of a buffer in a
17 * format that can be used as input to OpenSSL for an RSA signature. 17 * format that can be used as input to OpenSSL for an RSA signature.
18 * Needed until the stable OpenSSL release supports SHA-256/512 digests for 18 * Needed until the stable OpenSSL release supports SHA-256/512 digests for
19 * RSA signatures. 19 * RSA signatures.
20 * 20 *
21 * Returns DigestInfo || Digest where DigestInfo is the OID depending on the 21 * Returns DigestInfo || Digest where DigestInfo is the OID depending on the
22 * choice of the hash algorithm (see padding.c). Caller owns the returned 22 * choice of the hash algorithm (see padding.c). Caller owns the returned
23 * pointer and must Free() it. 23 * pointer and must Free() it.
24 */ 24 */
25 uint8_t* SignatureDigest(const uint8_t* buf, uint64_t len, int algorithm); 25 uint8_t* SignatureDigest(const uint8_t* buf, uint64_t len, int algorithm);
26 26
27 /* Calculates the signature on a buffer [buf] of length [len] using 27 /* Calculates the signature on a buffer [buf] of length [len] using
28 * the private RSA key file from [key_file] and signature algorithm 28 * the private RSA key file from [key_file] and signature algorithm
29 * [algorithm]. 29 * [algorithm].
30 * 30 *
31 * Returns the signature. Caller owns the buffer and must Free() it. 31 * Returns the signature. Caller owns the buffer and must Free() it.
32 */ 32 */
33 uint8_t* SignatureBuf(const uint8_t* buf, uint64_t len, const char* key_file, 33 uint8_t* SignatureBuf(const uint8_t* buf, uint64_t len, const char* key_file,
34 int algorithm); 34 int algorithm);
35 #endif /* VBOOT_REFERENCE_SIGNATURE_DIGEST_H_ */ 35 #endif /* VBOOT_REFERENCE_SIGNATURE_DIGEST_H_ */
OLDNEW
« no previous file with comments | « host/include/file_keys.h ('k') | host/lib/file_keys.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698