VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Crypto/rdrand.h
blob: ff8cfd299f460dd3193a393969ec718418a8b502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef HEADER_Crypto_RDRAND
#define HEADER_Crypto_RDRAND

#include "Common/Tcdefs.h"

#ifdef __cplusplus
extern "C" {
#endif

/*
 * generate bufLen random bytes using CPU RDRAND instruction
 * return 1 in case of success and 0 in case of failure
 */
int RDRAND_getBytes(unsigned char* buf, size_t bufLen);

/*
 * generate bufLen random bytes using CPU RDSEED instruction
 * return 1 in case of success and 0 in case of failure
 */
int RDSEED_getBytes(unsigned char* buf, size_t bufLen);

#ifdef __cplusplus
}
#endif

#endif