Angel Pons | 8a3453f | 2020-04-02 23:48:19 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Philipp Deppenwiese | 80961af | 2018-02-27 22:14:34 +0100 | [diff] [blame] | 2 | |
Shelley Chen | d5faa90 | 2020-10-16 10:55:07 -0700 | [diff] [blame] | 3 | #ifndef _MRC_CACHE_HASH_TPM_H_ |
| 4 | #define _MRC_CACHE_HASH_TPM_H_ |
Philipp Deppenwiese | 80961af | 2018-02-27 22:14:34 +0100 | [diff] [blame] | 5 | |
| 6 | #include <types.h> |
| 7 | |
| 8 | /* |
| 9 | * Updates mrc cache hash if it differs. |
| 10 | */ |
Shelley Chen | a79803c | 2020-10-16 13:15:59 -0700 | [diff] [blame] | 11 | void mrc_cache_update_hash(uint32_t index, const uint8_t *data, size_t size); |
Philipp Deppenwiese | 80961af | 2018-02-27 22:14:34 +0100 | [diff] [blame] | 12 | |
| 13 | /* |
| 14 | * Verifies mrc cache hash which is stored somewhere. |
| 15 | * return 1 verification was successful and 0 for error. |
| 16 | */ |
Shelley Chen | a79803c | 2020-10-16 13:15:59 -0700 | [diff] [blame] | 17 | int mrc_cache_verify_hash(uint32_t index, const uint8_t *data, size_t size); |
Philipp Deppenwiese | 80961af | 2018-02-27 22:14:34 +0100 | [diff] [blame] | 18 | |
Shelley Chen | d5faa90 | 2020-10-16 10:55:07 -0700 | [diff] [blame] | 19 | #endif /* _MRC_CACHE_HASH_TPM_H_ */ |