/**
  ******************************************************************************
  * @file           : sm_crypto_mcu.h
  * @brief          : Header for sm_crypto_mcu.c file.
  *                   This file provides the interface for SM cryptographic operations on MCU platforms.
  ******************************************************************************
  * @attention
  *
  * Copyright (c) 2025 STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file
  * in the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  *
  ******************************************************************************
  */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _SM_CRYPTO_MCU_H_
#define _SM_CRYPTO_MCU_H_

#ifdef __cplusplus
extern "C" {
#endif

/** @addtogroup MCU_CRYPTO
  * @{
  */

/* Includes ------------------------------------------------------------------*/
#include "sm_crypto.h"
#if defined(STM32U545xx) || defined(STM32U585xx)
#include "stm32u5xx_hal.h"
#elif defined(STM32U385xx)
#include "stm32u3xx_hal.h"
#elif defined(STM32WBA52xx) || defined(STM32WBA55xx) || defined(STM32WBA65xx)
#include "stm32wbaxx_hal.h"
#else
#error "product not supported"
#endif

/** @addtogroup SM_crypto_mcu_Exported_Constants
  * @{
  */
/* Exported constants --------------------------------------------------------*/
/**
 * @def MAX_FIXED_INFO_SIZE
 * @brief Maximum size for fixed info buffer in bytes.
 */
#define MAX_FIXED_INFO_SIZE ((uint32_t)256)
/** @} */

/** @addtogroup SM_crypto_mcu_Exported_Functions
  * @{
  */
/* Exported functions ------------------------------------------------------- */

/**
 * @brief Initializes cryptographic hardware modules for MCU.
 * @param rng Pointer to RNG handle.
 * @param pka Pointer to PKA handle.
 * @param hash Pointer to HASH handle.
 * @param cryp Pointer to CRYP handle.
 * @return SM_Crypto_Error_t error code.
 */
SM_Crypto_Error_t SM_initCryptoMCU(RNG_HandleTypeDef *rng, PKA_HandleTypeDef *pka, HASH_HandleTypeDef *hash, CRYP_HandleTypeDef *cryp);
/** @} */

/**
* @}
*/

#ifdef __cplusplus
}
#endif

#endif // _SM_CRYPTO_MCU_H_
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
