summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLionel Debieve <lionel.debieve@st.com>2019-08-26 15:14:51 +0200
committerLionel Debieve <lionel.debieve@st.com>2019-09-20 23:21:10 +0200
commitb1e0b11cc9e8a850a8e479927432068ce62a815a (patch)
tree41c2e96909c022dc8d66afbc2dd9136d6cd711ce /include
parent6a7cbfd56837409b85c26df0206177e59fc95a79 (diff)
crypto: stm32_hash: Add HASH driver
The driver manages the HASH processor IP on STM32MP1 Signed-off-by: Lionel Debieve <lionel.debieve@st.com> Change-Id: I3b67c80c16d819f86b951dae29a6c465e51ad585
Diffstat (limited to 'include')
-rw-r--r--include/drivers/st/stm32_hash.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/drivers/st/stm32_hash.h b/include/drivers/st/stm32_hash.h
new file mode 100644
index 00000000..969d7aa1
--- /dev/null
+++ b/include/drivers/st/stm32_hash.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2019, STMicroelectronics - All Rights Reserved
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#ifndef STM32_HASH_H
+#define STM32_HASH_H
+
+enum stm32_hash_algo_mode {
+ HASH_MD5SUM,
+ HASH_SHA1,
+ HASH_SHA224,
+ HASH_SHA256
+};
+
+int stm32_hash_update(const uint8_t *buffer, uint32_t length);
+int stm32_hash_final(uint8_t *digest);
+int stm32_hash_final_update(const uint8_t *buffer, uint32_t buf_length,
+ uint8_t *digest);
+void stm32_hash_init(enum stm32_hash_algo_mode mode);
+int stm32_hash_register(void);
+
+#endif /* STM32_HASH_H */