mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-10-27 11:58:55 +00:00 
			
		
		
		
	 66fb5a29bb
			
		
	
	66fb5a29bb
	
	
	
		
			
			Apply the pre-commit hook whitespace fixes to all files in the repo. (Line endings, blank lines at end of file, trailing whitespace)
		
			
				
	
	
		
			25 lines
		
	
	
		
			527 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			527 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #if !defined(MBEDTLS_CONFIG_FILE)
 | |
| #include "mbedtls/config.h"
 | |
| #else
 | |
| #include MBEDTLS_CONFIG_FILE
 | |
| #endif
 | |
| 
 | |
| #include <sys/types.h>
 | |
| #include <stdlib.h>
 | |
| #include <stdio.h>
 | |
| #include <esp_system.h>
 | |
| 
 | |
| #include "mbedtls/entropy_poll.h"
 | |
| 
 | |
| #ifndef MBEDTLS_ENTROPY_HARDWARE_ALT
 | |
| #error "MBEDTLS_ENTROPY_HARDWARE_ALT should always be set in ESP-IDF"
 | |
| #endif
 | |
| 
 | |
| int mbedtls_hardware_poll( void *data,
 | |
|                            unsigned char *output, size_t len, size_t *olen )
 | |
| {
 | |
|     esp_fill_random(output, len);
 | |
|     *olen = len;
 | |
|     return 0;
 | |
| }
 |