1 /* Copyright 2010 The ChromiumOS Authors 2 * Use of this source code is governed by a BSD-style license that can be 3 * found in the LICENSE file. 4 * 5 * Utility functions for file and key handling. 6 */ 7 8 #ifndef VBOOT_REFERENCE_FILE_KEYS_H_ 9 #define VBOOT_REFERENCE_FILE_KEYS_H_ 10 11 #include "2sha.h" 12 13 /* Calculates the appropriate digest for the data in [input_file] based on the 14 * hash algorithm [alg] and stores it into [digest], which is of size 15 * [digest_size]. Returns VB2_SUCCESS, or non-zero on error. 16 */ 17 vb2_error_t DigestFile(char *input_file, enum vb2_hash_algorithm alg, 18 uint8_t *digest, uint32_t digest_size); 19 20 #endif /* VBOOT_REFERENCE_FILE_KEYS_H_ */ 21