/*
* Copyright (C) 2000, 2001, 2004, 2005, 2007, 2015, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: entropy2_test.c,v 1.16 2007/06/19 23:46:59 tbox Exp $ */
/*! \file */
#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <isc/keyboard.h>
static void
unsigned int len;
unsigned char *base;
printf("\n\t");
}
printf("\n");
}
static void
if (result != ISC_R_SUCCESS) {
exit(1);
}
}
static isc_result_t
if (blocking)
printf("start called, blocking mode.\n");
else
printf("start called, non-blocking mode.\n");
return (isc_keyboard_open(kbd));
}
static void
printf("ENOUGH! Stop typing, please.\r\n");
printf("stop called\n");
}
static isc_result_t
isc_time_t t;
unsigned char c;
if (!blocking)
return (ISC_R_NOENTROPY);
if (result != ISC_R_SUCCESS)
return (result);
TIME_NOW(&t);
sample = isc_time_nanoseconds(&t);
extra = c;
if (result != ISC_R_SUCCESS) {
printf("\r\n");
return (result);
}
printf(".");
return (result);
}
int
unsigned int returned;
unsigned int flags;
CHECK("isc_mem_create()",
isc_mem_create(0, 0, &mctx));
CHECK("isc_entropy_create()",
&source);
"Reading 32 bytes of GOOD random data only, partial OK\n");
flags = 0;
returned = 0;
if (result == ISC_R_NOENTROPY) {
}
return (0);
}