|
|
1.1.1.9 root 1: /*
2: Legal Notice: The source code contained in this file has been derived from
3: the source code of Encryption for the Masses 2.02a, which is Copyright (c)
4: Paul Le Roux and which is covered by the 'License Agreement for Encryption
5: for the Masses'. Modifications and additions to that source code contained
6: in this file are Copyright (c) TrueCrypt Foundation and are covered by the
1.1.1.10! root 7: TrueCrypt License 2.3 the full text of which is contained in the file
1.1.1.9 root 8: License.txt included in TrueCrypt binary and source code distribution
9: packages. */
1.1 root 10:
1.1.1.7 root 11:
1.1.1.6 root 12: #include "Crypto.h"
1.1 root 13:
1.1.1.6 root 14: /* RNG defines & pool pointers */
15: #define RNG_POOL_SIZE 320 // Must be divisible by the size of the output of each of the implemented hash functions. (in bytes)
16: #if RNG_POOL_SIZE % SHA1_DIGESTSIZE || RNG_POOL_SIZE % WHIRLPOOL_DIGESTSIZE || RNG_POOL_SIZE % RIPEMD160_DIGESTSIZE
17: #error RNG_POOL_SIZE must be divisible by the size of the output of each of the implemented hash functions.
18: #endif
19:
20: #define RANDOMPOOL_ALLOCSIZE RNG_POOL_SIZE
21:
1.1.1.8 root 22: void RandAddInt ( unsigned __int32 x );
1.1 root 23: int Randinit ( void );
24: void Randfree ( void );
1.1.1.6 root 25: void RandSetHashFunction ( int hash_algo_id );
26: int RandGetHashFunction (void);
1.1.1.8 root 27: BOOL Randmix ( void );
1.1 root 28: void RandaddBuf ( void *buf , int len );
1.1.1.8 root 29: BOOL FastPoll ( void );
30: BOOL SlowPoll ( void );
31: BOOL RandpeekBytes ( unsigned char *buf , int len );
32: BOOL RandgetBytes ( unsigned char *buf , int len, BOOL forceSlowPoll );
33:
34: #ifdef _WIN32
35:
36: extern BOOL volatile bFastPollEnabled;
37: extern BOOL volatile bRandmixEnabled;
38:
1.1 root 39: LRESULT CALLBACK MouseProc ( int nCode , WPARAM wParam , LPARAM lParam );
40: LRESULT CALLBACK KeyboardProc ( int nCode , WPARAM wParam , LPARAM lParam );
41: void ThreadSafeThreadFunction ( void *dummy );
1.1.1.7 root 42:
43: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.