1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Implement function RandgetBytesFull that enables generating random bytes of any length.

This commit is contained in:
Mounir IDRASSI
2014-12-08 23:41:29 +01:00
parent fd0e434087
commit 32e72d1117
2 changed files with 55 additions and 21 deletions

View File

@@ -44,8 +44,16 @@ void RandaddBuf ( void *buf , int len );
BOOL FastPoll ( void );
BOOL SlowPoll ( void );
BOOL RandpeekBytes ( unsigned char *buf , int len );
/* Get len random bytes from the pool (max. RNG_POOL_SIZE bytes per a single call) */
BOOL RandgetBytes ( unsigned char *buf , int len, BOOL forceSlowPoll );
/* Get len random bytes from the pool.
* If allowAnyLength is FALSE, then len must be less or equal to RNG_POOL_SIZE
* If allowAnyLength is TRUE, then len can have any positive value
*/
BOOL RandgetBytesFull ( unsigned char *buf , int len, BOOL forceSlowPoll , BOOL allowAnyLength);
#ifdef _WIN32
extern BOOL volatile bFastPollEnabled;