Sha256: 1c629551e5719a0e15753a89b1e24fc2093e666b3f9497a70bafa59c397211ac

Contents?: true

Size: 313 Bytes

Versions: 3

Compression:

Stored size: 313 Bytes

Contents

#include "randombytes-impl.h"

unsigned char x[65536];
unsigned long long freq[256];

int main()
{
  unsigned long long i;

  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;
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby_nacl-0.1.2 ext/ruby_nacl/NaCl/randombytes/test.c
ruby_nacl-0.1.1 ext/ruby_nacl/NaCl/randombytes/test.c
ruby_nacl-0.1.0 ext/ruby_nacl/NaCl/randombytes/test.c