nu_rng.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**************************************************************************//**
  2. * @file nu_rng.h
  3. * @version V3.00
  4. * @brief Random Number Generator Interface Controller (rng) driver header file
  5. *
  6. * @copyright SPDX-License-Identifier: Apache-2.0
  7. * @copyright Copyright (C) 2020 Nuvoton Technology Corp. All rights reserved.
  8. *****************************************************************************/
  9. #ifndef __NU_RNG_H__
  10. #define __NU_RNG_H__
  11. #ifdef __cplusplus
  12. extern "C"
  13. {
  14. #endif
  15. /** @addtogroup Standard_Driver Standard Driver
  16. @{
  17. */
  18. /** @addtogroup RNG_Driver RNG Driver
  19. @{
  20. */
  21. /** @addtogroup RNG_EXPORTED_CONSTANTS RNG Exported Constants
  22. @{
  23. */
  24. /**@}*/ /* end of group RNG_EXPORTED_CONSTANTS */
  25. /** @addtogroup RNG_EXPORTED_FUNCTIONS RNG Exported Functions
  26. @{
  27. */
  28. int32_t RNG_Open(void);
  29. int32_t RNG_Random(uint32_t *pu32Buf, int32_t nWords);
  30. int32_t RNG_ECDSA_Init(uint32_t u32KeySize, uint32_t au32ECC_N[18]);
  31. int32_t RNG_ECDSA(uint32_t u32KeySize);
  32. int32_t RNG_ECDH_Init(uint32_t u32KeySize, uint32_t au32ECC_N[18]);
  33. int32_t RNG_ECDH(uint32_t u32KeySize);
  34. int32_t RNG_EntropyPoll(uint8_t *pu8Out, int32_t i32Len);
  35. /**@}*/ /* end of group RNG_EXPORTED_FUNCTIONS */
  36. /**@}*/ /* end of group RNG_Driver */
  37. /**@}*/ /* end of group Standard_Driver */
  38. #ifdef __cplusplus
  39. }
  40. #endif
  41. #endif /* __NU_RNG_H__ */