1 #include <stddef.h>
2 
3 /* IMPORTANT! PROVIDE HERE A REAL ENTROPY! */
mbedtls_hardware_poll(void * data,unsigned char * output,size_t len,size_t * olen)4 int mbedtls_hardware_poll(void *data, unsigned char *output, size_t len,
5 			  size_t *olen)
6 {
7 	(void)data;
8 
9 	if (output == NULL) {
10 		return -1;
11 	}
12 
13 	if (olen == NULL) {
14 		return -1;
15 	}
16 
17 	if (len == 0) {
18 		return -1;
19 	}
20 
21 	/*We don't get real random numbers*/
22 	for (size_t i = 0; i < len; i++) {
23 		output[i] = i;
24 	}
25 
26 	*olen = len;
27 
28 	return 0;
29 }