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 * Utility functions for message digests. | 5 * Utility functions for message digests. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef VBOOT_REFERENCE_SHA_UTILITY_H_ | 8 #ifndef VBOOT_REFERENCE_SHA_UTILITY_H_ |
9 #define VBOOT_REFERENCE_SHA_UTILITY_H_ | 9 #define VBOOT_REFERENCE_SHA_UTILITY_H_ |
10 | 10 |
(...skipping 30 matching lines...) Expand all Loading... |
41 /* Returns the appropriate digest for the data in [input_file] | 41 /* Returns the appropriate digest for the data in [input_file] |
42 * based on the signature [algorithm]. | 42 * based on the signature [algorithm]. |
43 * Caller owns the returned digest and must free it. | 43 * Caller owns the returned digest and must free it. |
44 */ | 44 */ |
45 uint8_t* DigestFile(char* input_file, int sig_algorithm); | 45 uint8_t* DigestFile(char* input_file, int sig_algorithm); |
46 | 46 |
47 /* Returns the appropriate digest of [buf] of length | 47 /* Returns the appropriate digest of [buf] of length |
48 * [len] based on the signature [algorithm]. | 48 * [len] based on the signature [algorithm]. |
49 * Caller owns the returned digest and must free it. | 49 * Caller owns the returned digest and must free it. |
50 */ | 50 */ |
51 uint8_t* DigestBuf(uint8_t* buf, int len, int sig_algorithm); | 51 uint8_t* DigestBuf(const uint8_t* buf, int len, int sig_algorithm); |
52 | 52 |
53 #endif /* VBOOT_REFERENCE_SHA_UTILITY_H_ */ | 53 #endif /* VBOOT_REFERENCE_SHA_UTILITY_H_ */ |
OLD | NEW |