|
|
1.1.1.6 root 1: /* Legal Notice: The source code contained in this file has been derived from
2: the source code of Encryption for the Masses 2.02a, which is Copyright (c)
3: 1998-99 Paul Le Roux and which is covered by the 'License Agreement for
4: Encryption for the Masses'. Modifications and additions to that source code
1.1.1.7 ! root 5: contained in this file are Copyright (c) 2004-2006 TrueCrypt Foundation and
1.1.1.6 root 6: Copyright (c) 2004 TrueCrypt Team, and are covered by TrueCrypt License 2.0
7: the full text of which is contained in the file License.txt included in
8: TrueCrypt binary and source code distribution archives. */
1.1 root 9:
1.1.1.7 ! root 10: #ifdef _WIN32
! 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:
22: extern BOOL volatile bFastPollEnabled;
23: extern BOOL volatile bRandmixEnabled;
24:
25: _inline void _RandaddInt32 ( unsigned __int32 x );
1.1 root 26: int Randinit ( void );
27: void Randfree ( void );
1.1.1.6 root 28: void RandSetHashFunction ( int hash_algo_id );
29: int RandGetHashFunction (void);
1.1 root 30: void Randmix ( void );
31: void RandaddBuf ( void *buf , int len );
32: LRESULT CALLBACK MouseProc ( int nCode , WPARAM wParam , LPARAM lParam );
33: LRESULT CALLBACK KeyboardProc ( int nCode , WPARAM wParam , LPARAM lParam );
34: void ThreadSafeThreadFunction ( void *dummy );
35: void SlowPollWinNT ( void );
36: void FastPoll ( void );
1.1.1.7 ! root 37:
! 38: #endif
! 39:
! 40: BOOL RandpeekBytes ( unsigned char *buf , int len );
! 41: BOOL RandgetBytes ( unsigned char *buf , int len, BOOL forceSlowPoll );
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.