summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rand/rand.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/rand/rand.h')
-rw-r--r--src/lib/libcrypto/rand/rand.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/lib/libcrypto/rand/rand.h b/src/lib/libcrypto/rand/rand.h
index fd8ee38366..28f45ec052 100644
--- a/src/lib/libcrypto/rand/rand.h
+++ b/src/lib/libcrypto/rand/rand.h
@@ -66,24 +66,45 @@ extern "C" {
66typedef struct rand_meth_st 66typedef struct rand_meth_st
67 { 67 {
68 void (*seed)(const void *buf, int num); 68 void (*seed)(const void *buf, int num);
69 void (*bytes)(unsigned char *buf, int num); 69 int (*bytes)(unsigned char *buf, int num);
70 void (*cleanup)(void); 70 void (*cleanup)(void);
71 void (*add)(const void *buf, int num, double entropy);
72 int (*pseudorand)(unsigned char *buf, int num);
71 } RAND_METHOD; 73 } RAND_METHOD;
72 74
73void RAND_set_rand_method(RAND_METHOD *meth); 75void RAND_set_rand_method(RAND_METHOD *meth);
74RAND_METHOD *RAND_get_rand_method(void ); 76RAND_METHOD *RAND_get_rand_method(void );
75RAND_METHOD *RAND_SSLeay(void); 77RAND_METHOD *RAND_SSLeay(void);
76void RAND_cleanup(void ); 78void RAND_cleanup(void );
77void RAND_bytes(unsigned char *buf,int num); 79int RAND_bytes(unsigned char *buf,int num);
80int RAND_pseudo_bytes(unsigned char *buf,int num);
78void RAND_seed(const void *buf,int num); 81void RAND_seed(const void *buf,int num);
82void RAND_add(const void *buf,int num,double entropy);
79int RAND_load_file(const char *file,long max_bytes); 83int RAND_load_file(const char *file,long max_bytes);
80int RAND_write_file(const char *file); 84int RAND_write_file(const char *file);
81char *RAND_file_name(char *file,int num); 85const char *RAND_file_name(char *file,int num);
86int RAND_status(void);
87int RAND_egd(const char *path);
82#ifdef WINDOWS 88#ifdef WINDOWS
83void RAND_screen(void); 89void RAND_screen(void);
84#endif 90#endif
91void ERR_load_RAND_strings(void);
92
93/* BEGIN ERROR CODES */
94/* The following lines are auto generated by the script mkerr.pl. Any changes
95 * made after this point may be overwritten when the script is next run.
96 */
97
98/* Error codes for the RAND functions. */
99
100/* Function codes. */
101#define RAND_F_SSLEAY_RAND_BYTES 100
102
103/* Reason codes. */
104#define RAND_R_PRNG_NOT_SEEDED 100
105
85#ifdef __cplusplus 106#ifdef __cplusplus
86} 107}
87#endif 108#endif
88
89#endif 109#endif
110