2013-01-20 18:48:55 -05:00
|
|
|
#include "randombytes.h"
|
2013-01-20 17:03:05 -05:00
|
|
|
|
|
|
|
unsigned char x[65536];
|
|
|
|
unsigned long long freq[256];
|
|
|
|
|
|
|
|
int main(void)
|
|
|
|
{
|
2014-09-14 13:34:16 -04:00
|
|
|
unsigned long long i;
|
2013-01-20 17:03:05 -05:00
|
|
|
|
2014-09-14 13:34:16 -04:00
|
|
|
randombytes(x,sizeof x);
|
|
|
|
for (i = 0;i < 256;++i) {
|
|
|
|
freq[i] = 0;
|
|
|
|
}
|
|
|
|
for (i = 0;i < sizeof x;++i) {
|
|
|
|
++freq[255 & (int) x[i]];
|
|
|
|
}
|
|
|
|
for (i = 0;i < 256;++i) {
|
|
|
|
if (!freq[i]) {
|
|
|
|
return 111;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
2013-01-20 17:03:05 -05:00
|
|
|
}
|