blob: c996fb3e4c10eaf7c73451bbc8e7cf420b96d3d3 [file] [log] [blame]
Heiko Schocheredaf9b12014-03-03 12:19:26 +01001/*
2 * Copyright (c) 2013, Andreas Oetken.
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5*/
6
7#ifndef _RSA_CHECKSUM_H
8#define _RSA_CHECKSUM_H
9
10#include <errno.h>
11#include <image.h>
Jeroen Hofsteebfe88fe2014-06-12 22:27:12 +020012#include <u-boot/sha1.h>
13#include <u-boot/sha256.h>
Heiko Schocheredaf9b12014-03-03 12:19:26 +010014
Heiko Schocher4b817562014-03-03 12:19:27 +010015extern const uint8_t padding_sha256_rsa4096[];
Heiko Schocheredaf9b12014-03-03 12:19:26 +010016extern const uint8_t padding_sha256_rsa2048[];
17extern const uint8_t padding_sha1_rsa2048[];
18
19void sha256_calculate(const struct image_region region[], int region_count,
20 uint8_t *checksum);
21void sha1_calculate(const struct image_region region[], int region_count,
22 uint8_t *checksum);
23
24#endif