rsa-checksum.h 567 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2013, Andreas Oetken.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _RSA_CHECKSUM_H
  7. #define _RSA_CHECKSUM_H
  8. #include <errno.h>
  9. #include <image.h>
  10. #include <sha1.h>
  11. #include <sha256.h>
  12. extern const uint8_t padding_sha256_rsa4096[];
  13. extern const uint8_t padding_sha256_rsa2048[];
  14. extern const uint8_t padding_sha1_rsa2048[];
  15. void sha256_calculate(const struct image_region region[], int region_count,
  16. uint8_t *checksum);
  17. void sha1_calculate(const struct image_region region[], int region_count,
  18. uint8_t *checksum);
  19. #endif