test.cpp (307B)
1 #include <stdio.h> 2 #include <stdint.h> 3 #include <inttypes.h> 4 #include "ggentropy.h" 5 6 int main() { 7 uint8_t entropy[ 16 ]; 8 if( !ggentropy( entropy, sizeof( entropy ) ) ) 9 return 1; 10 11 for( size_t i = 0; i < sizeof( entropy ); i++ ) { 12 printf( "%02" PRIx8, entropy[ i ] ); 13 } 14 printf( "\n" ); 15 16 return 0; 17 }