2 * Copyright (c) 2013, Andreas Oetken.
4 * SPDX-License-Identifier: GPL-2.0+
7 #ifndef _RSA_CHECKSUM_H
8 #define _RSA_CHECKSUM_H
12 #include <u-boot/sha1.h>
13 #include <u-boot/sha256.h>
16 * hash_calculate() - Calculate hash over the data
18 * @name: Name of algorithm to be used for hash calculation
19 * @region: Array having info of regions over which hash needs to be calculated
20 * @region_count: Number of regions in the region array
21 * @checksum: Buffer contanining the output hash
23 * @return 0 if OK, < 0 if error
25 int hash_calculate(const char *name,
26 const struct image_region region[], int region_count,