From 1804d1f00895661869bdc0bb7a0a7f593368e801 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 8 Sep 2018 08:22:05 +0000 Subject: TRNG API now takes a new "size" parameter, the API can now generate random numbers of variable size. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@12249 110e8d01-0319-4d1e-a829-52ad28d1bb01 --- os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c | 5 +++-- os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'os/hal/ports/STM32/LLD/CRYPv1') diff --git a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c index b32596814..edd2e09b0 100644 --- a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c +++ b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.c @@ -1314,7 +1314,8 @@ cryerror_t cry_lld_HMACSHA512_final(CRYDriver *cryp, * @brief True random numbers generator. * * @param[in] cryp pointer to the @p CRYDriver object - * @param[out] out 128 bits output buffer + * @param[in] size size of output buffer + * @param[out] out output buffer * @return The operation status. * @retval CRY_NOERROR if the operation succeeded. * @retval CRY_ERR_INV_ALGO if the operation is unsupported on this @@ -1324,7 +1325,7 @@ cryerror_t cry_lld_HMACSHA512_final(CRYDriver *cryp, * * @notapi */ -cryerror_t cry_lld_TRNG(CRYDriver *cryp, uint8_t *out) { +cryerror_t cry_lld_TRNG(CRYDriver *cryp, size_t size, uint8_t *out) { (void)cryp; (void)out; diff --git a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h index 641e3913a..74566ba37 100644 --- a/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h +++ b/os/hal/ports/STM32/LLD/CRYPv1/hal_crypto_lld.h @@ -357,7 +357,7 @@ extern "C" { uint8_t *out); #endif #if (CRY_LLD_SUPPORTS_TRNG == TRUE) || defined(__DOXYGEN__) - cryerror_t cry_lld_TRNG(CRYDriver *cryp, uint8_t *out); + cryerror_t cry_lld_TRNG(CRYDriver *cryp, size_t size, uint8_t *out); #endif #ifdef __cplusplus } -- cgit v1.2.3