cryptlib
3.4.1
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
random
amx.c
Go to the documentation of this file.
1
/****************************************************************************
2
* *
3
* AMX Randomness-Gathering Code *
4
* Copyright Peter Gutmann 1996-2005 *
5
* *
6
****************************************************************************/
7
8
/* This module is part of the cryptlib continuously seeded pseudorandom
9
number generator. For usage conditions, see random.c.
10
11
This code represents a template for randomness-gathering only and will
12
need to be modified to provide randomness via an external source. In its
13
current form it does not provide any usable entropy and should not be
14
used as an entropy source */
15
16
/* General includes */
17
18
#include <cjzzz.h>
19
#include "
crypt.h
"
20
21
/* The size of the intermediate buffer used to accumulate polled data */
22
23
#define RANDOM_BUFSIZE 256
24
25
void
fastPoll
(
void
)
26
{
27
RANDOM_STATE
randomState;
28
BYTE
buffer
[
RANDOM_BUFSIZE
];
29
30
initRandomData( randomState, buffer,
RANDOM_BUFSIZE
);
31
addRandomLong( randomState, cjtmtick() );
32
endRandomData( randomState, 1 );
33
}
34
35
void
slowPoll
(
void
)
36
{
37
return
;
38
}
Generated on Thu Jan 10 2013 10:00:51 for cryptlib by
1.8.2