stm32_hash.h 553 B

123456789101112131415161718192021222324
  1. /*
  2. * Copyright (c) 2019, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32_HASH_H
  7. #define STM32_HASH_H
  8. enum stm32_hash_algo_mode {
  9. HASH_MD5SUM,
  10. HASH_SHA1,
  11. HASH_SHA224,
  12. HASH_SHA256
  13. };
  14. int stm32_hash_update(const uint8_t *buffer, size_t length);
  15. int stm32_hash_final(uint8_t *digest);
  16. int stm32_hash_final_update(const uint8_t *buffer, uint32_t buf_length,
  17. uint8_t *digest);
  18. void stm32_hash_init(enum stm32_hash_algo_mode mode);
  19. int stm32_hash_register(void);
  20. #endif /* STM32_HASH_H */