123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- #include "mbedtls_config.h"
- #include "rng.h"
- #ifdef MBEDTLS_ENTROPY_HARDWARE_ALT
- #include "main.h"
- #include <string.h>
- #include "mbedtls/entropy_poll.h"
- int mbedtls_hardware_poll( void *Data, unsigned char *Output, size_t Len, size_t *oLen )
- {
- uint32_t index;
- uint32_t randomValue;
-
- for (index = 0; index < Len/4; index++)
- {
- randomValue = GetRandomNumber();
- *oLen += 4;
- memset(&(Output[index * 4]), (int)randomValue, 4);
- }
-
- return 0;
- }
- #endif
|