blob: cf443f291bdeb98f9df97e03ea8e919097466f14 [file] [log] [blame]
Angel Pons8a3453f2020-04-02 23:48:19 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Philipp Deppenwiese80961af2018-02-27 22:14:34 +01002
Shelley Chend5faa902020-10-16 10:55:07 -07003#ifndef _MRC_CACHE_HASH_TPM_H_
4#define _MRC_CACHE_HASH_TPM_H_
Philipp Deppenwiese80961af2018-02-27 22:14:34 +01005
6#include <types.h>
7
8/*
9 * Updates mrc cache hash if it differs.
10 */
Shelley Chena79803c2020-10-16 13:15:59 -070011void mrc_cache_update_hash(uint32_t index, const uint8_t *data, size_t size);
Philipp Deppenwiese80961af2018-02-27 22:14:34 +010012
13/*
14 * Verifies mrc cache hash which is stored somewhere.
15 * return 1 verification was successful and 0 for error.
16 */
Shelley Chena79803c2020-10-16 13:15:59 -070017int mrc_cache_verify_hash(uint32_t index, const uint8_t *data, size_t size);
Philipp Deppenwiese80961af2018-02-27 22:14:34 +010018
Shelley Chend5faa902020-10-16 10:55:07 -070019#endif /* _MRC_CACHE_HASH_TPM_H_ */