diff options
author | Tom Rini <trini@ti.com> | 2014-04-17 14:33:25 -0400 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2014-04-17 14:33:25 -0400 |
commit | 0f507779ca00d90cdd4bcc8252630370339b7ea6 (patch) | |
tree | a91a89ac67dcbd42c8a4357501d155a129fa1e5a /include/rsa-checksum.h | |
parent | 0f605c1501f6e82553e9affc6e17876a85db408c (diff) | |
parent | ece0d370144fdecb6f3ed5738ffe96f5b12f9e96 (diff) | |
download | u-boot-imx-0f507779ca00d90cdd4bcc8252630370339b7ea6.zip u-boot-imx-0f507779ca00d90cdd4bcc8252630370339b7ea6.tar.gz u-boot-imx-0f507779ca00d90cdd4bcc8252630370339b7ea6.tar.bz2 |
Merge branch 'next'
Diffstat (limited to 'include/rsa-checksum.h')
-rw-r--r-- | include/rsa-checksum.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/rsa-checksum.h b/include/rsa-checksum.h new file mode 100644 index 0000000..612db85 --- /dev/null +++ b/include/rsa-checksum.h @@ -0,0 +1,24 @@ +/* + * Copyright (c) 2013, Andreas Oetken. + * + * SPDX-License-Identifier: GPL-2.0+ +*/ + +#ifndef _RSA_CHECKSUM_H +#define _RSA_CHECKSUM_H + +#include <errno.h> +#include <image.h> +#include <sha1.h> +#include <sha256.h> + +extern const uint8_t padding_sha256_rsa4096[]; +extern const uint8_t padding_sha256_rsa2048[]; +extern const uint8_t padding_sha1_rsa2048[]; + +void sha256_calculate(const struct image_region region[], int region_count, + uint8_t *checksum); +void sha1_calculate(const struct image_region region[], int region_count, + uint8_t *checksum); + +#endif |