933460c03c5af31131ec122c1f4ad2210d5f1a1a
5 #include <mLib/alloc.h>
6 #include <mLib/base64.h>
9 #include <mLib/report.h>
11 #include <catacomb/rand.h>
12 #include <catacomb/noise.h>
14 int main(int argc
, char *argv
[])
23 pquis(stderr
, "Usage: $ [BITS]\n");
26 n
= argc
== 2 ?
atoi(argv
[1]) : 128;
27 if (!n
|| n
% 8) die(EXIT_FAILURE
, "bad bit count");
30 rand_noisesrc(RAND_GLOBAL
, &noise_source
);
31 rand_seed(RAND_GLOBAL
, 160);
32 rand_get(RAND_GLOBAL
, p
, n
);
36 base64_encode(&b
, p
, n
, &d
);
37 base64_encode(&b
, 0, 0, &d
);
38 printf("%s\n", d
.buf
);