Go to the documentation of this file.
31 #ifndef _STM32MP2XX_CRYPTO_HASH_H
32 #define _STM32MP2XX_CRYPTO_HASH_H
38 #ifndef STM32MP2XX_CRYPTO_HASH_SUPPORT
39 #define STM32MP2XX_CRYPTO_HASH_SUPPORT DISABLED
40 #elif (STM32MP2XX_CRYPTO_HASH_SUPPORT != ENABLED && STM32MP2XX_CRYPTO_HASH_SUPPORT != DISABLED)
41 #error STM32MP2XX_CRYPTO_HASH_SUPPORT parameter is not valid
45 #define HASH_CR_ALGO_SHA1 0
46 #define HASH_CR_ALGO_SHA224 HASH_CR_ALGO_1
47 #define HASH_CR_ALGO_SHA256 (HASH_CR_ALGO_1 | HASH_CR_ALGO_0)
48 #define HASH_CR_ALGO_SHA384 (HASH_CR_ALGO_3 | HASH_CR_ALGO_2)
49 #define HASH_CR_ALGO_SHA512 (HASH_CR_ALGO_3 | HASH_CR_ALGO_2 | HASH_CR_ALGO_1 | HASH_CR_ALGO_0)
50 #define HASH_CR_ALGO_SHA512_224 (HASH_CR_ALGO_3 | HASH_CR_ALGO_2 | HASH_CR_ALGO_0)
51 #define HASH_CR_ALGO_SHA512_256 (HASH_CR_ALGO_3 | HASH_CR_ALGO_2 | HASH_CR_ALGO_1)
52 #define HASH_CR_ALGO_SHA3_224 HASH_CR_ALGO_2
53 #define HASH_CR_ALGO_SHA3_256 (HASH_CR_ALGO_2 | HASH_CR_ALGO_0)
54 #define HASH_CR_ALGO_SHA3_384 (HASH_CR_ALGO_2 | HASH_CR_ALGO_1)
55 #define HASH_CR_ALGO_SHA3_512 (HASH_CR_ALGO_2 | HASH_CR_ALGO_1 | HASH_CR_ALGO_0)
56 #define HASH_CR_ALGO_SHAKE128 HASH_CR_ALGO_3
57 #define HASH_CR_ALGO_SHAKE256 (HASH_CR_ALGO_3 | HASH_CR_ALGO_0)
60 #define HASH_CR_DATATYPE_32B 0
61 #define HASH_CR_DATATYPE_16B HASH_CR_DATATYPE_0
62 #define HASH_CR_DATATYPE_8B HASH_CR_DATATYPE_1
63 #define HASH_CR_DATATYPE_1B (HASH_CR_DATATYPE_1 | HASH_CR_DATATYPE_0)
error_t hashInit(void)
HASH module initialization.
General definitions for cryptographic algorithms.