blob: df04730d6d60dbb7b46924c12ddab751aea99ae8 [file] [log] [blame]
Lionel Debieve8cc21ea2019-08-26 15:14:51 +02001/*
2 * Copyright (c) 2019, STMicroelectronics - All Rights Reserved
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef STM32_HASH_H
8#define STM32_HASH_H
9
10enum stm32_hash_algo_mode {
11 HASH_MD5SUM,
12 HASH_SHA1,
13 HASH_SHA224,
14 HASH_SHA256
15};
16
Yann Gautierf36952b2019-10-02 16:33:41 +020017int stm32_hash_update(const uint8_t *buffer, size_t length);
Lionel Debieve8cc21ea2019-08-26 15:14:51 +020018int stm32_hash_final(uint8_t *digest);
19int stm32_hash_final_update(const uint8_t *buffer, uint32_t buf_length,
20 uint8_t *digest);
21void stm32_hash_init(enum stm32_hash_algo_mode mode);
22int stm32_hash_register(void);
23
24#endif /* STM32_HASH_H */