|
|
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.8 ! root 6: Copyright (c) 2004 TrueCrypt Team, and are covered by TrueCrypt License 2.1
1.1.1.6 root 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:
1.1.1.6 root 11: #include "Crypto.h"
1.1 root 12:
1.1.1.6 root 13: /* RNG defines & pool pointers */
14: #define RNG_POOL_SIZE 320 // Must be divisible by the size of the output of each of the implemented hash functions. (in bytes)
15: #if RNG_POOL_SIZE % SHA1_DIGESTSIZE || RNG_POOL_SIZE % WHIRLPOOL_DIGESTSIZE || RNG_POOL_SIZE % RIPEMD160_DIGESTSIZE
16: #error RNG_POOL_SIZE must be divisible by the size of the output of each of the implemented hash functions.
17: #endif
18:
19: #define RANDOMPOOL_ALLOCSIZE RNG_POOL_SIZE
20:
1.1.1.8 ! root 21: void RandAddInt ( unsigned __int32 x );
1.1 root 22: int Randinit ( void );
23: void Randfree ( void );
1.1.1.6 root 24: void RandSetHashFunction ( int hash_algo_id );
25: int RandGetHashFunction (void);
1.1.1.8 ! root 26: BOOL Randmix ( void );
1.1 root 27: void RandaddBuf ( void *buf , int len );
1.1.1.8 ! root 28: BOOL FastPoll ( void );
! 29: BOOL SlowPoll ( void );
! 30: BOOL RandpeekBytes ( unsigned char *buf , int len );
! 31: BOOL RandgetBytes ( unsigned char *buf , int len, BOOL forceSlowPoll );
! 32:
! 33: #ifdef _WIN32
! 34:
! 35: extern BOOL volatile bFastPollEnabled;
! 36: extern BOOL volatile bRandmixEnabled;
! 37:
1.1 root 38: LRESULT CALLBACK MouseProc ( int nCode , WPARAM wParam , LPARAM lParam );
39: LRESULT CALLBACK KeyboardProc ( int nCode , WPARAM wParam , LPARAM lParam );
40: void ThreadSafeThreadFunction ( void *dummy );
1.1.1.7 root 41:
42: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.