/* Don't write binary data to a tty, unless we are forced to */
if (isatty(STDOUT_FILENO))
output_hex = 1;
-
+
while ((ch = getopt(argc, argv, "vxXhb:")) != -1) {
switch (ch) {
case 'v':
}
log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
-
+
#ifdef USE_SEED_FILES
prng_read_seedfile();
#endif
/*
* Seed the RNG from wherever we can
*/
-
+
/* Take whatever is on the stack, but don't credit it */
RAND_add(buf, bytes, 0);
printf("\n");
} else
ret = atomicio(vwrite, STDOUT_FILENO, buf, bytes);
-
+
memset(buf, '\0', bytes);
xfree(buf);
-
+
return ret == bytes ? 0 : 1;
}