| OLD | NEW |
| (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 /* Utility functions for message digest functions. */ | |
| 7 | |
| 8 #ifndef VBOOT_REFERENCE_DIGEST_UTILITY_H_ | |
| 9 #define VBOOT_REFERENCE_DIGEST_UTILITY_H_ | |
| 10 | |
| 11 #include <inttypes.h> | |
| 12 | |
| 13 /* Returns the SHA-1 digest of data in [input_file]. | |
| 14 * Caller owns the returned digest and must free it. | |
| 15 */ | |
| 16 uint8_t* SHA1_file(char *input_file); | |
| 17 | |
| 18 /* Returns the SHA-256 digest of data in [input_file]. | |
| 19 * Caller owns the returned digest and must free it. | |
| 20 */ | |
| 21 uint8_t* SHA256_file(char *input_file); | |
| 22 | |
| 23 /* Returns the SHA-512 digest of data in [input_file]. | |
| 24 * Caller owns the returned digest and must free it. | |
| 25 */ | |
| 26 uint8_t* SHA512_file(char *input_file); | |
| 27 | |
| 28 /* Returns the appropriate digest for the data in [input_file] | |
| 29 * based on the signature [algorithm]. | |
| 30 * Caller owns the returned digest and must free it. | |
| 31 */ | |
| 32 uint8_t* calculate_digest(char *input_file, int algorithm); | |
| 33 | |
| 34 #endif /* VBOOT_REFERENCE_DIGEST_UTILITY_H_ */ | |
| OLD | NEW |