1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2013, Andreas Oetken.
6 #ifndef _RSA_CHECKSUM_H
7 #define _RSA_CHECKSUM_H
10 #include <u-boot/sha1.h>
11 #include <u-boot/sha256.h>
12 #include <u-boot/sha512.h>
17 * hash_calculate() - Calculate hash over the data
19 * @name: Name of algorithm to be used for hash calculation
20 * @region: Array having info of regions over which hash needs to be calculated
21 * @region_count: Number of regions in the region array
22 * @checksum: Buffer contanining the output hash
24 * Return: 0 if OK, < 0 if error
26 int hash_calculate(const char *name,
27 const struct image_region *region, int region_count,