diff options
Diffstat (limited to 'src/lib/libcrypto/rand/rand.h')
-rw-r--r-- | src/lib/libcrypto/rand/rand.h | 29 |
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" { | |||
66 | typedef struct rand_meth_st | 66 | typedef 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 | ||
73 | void RAND_set_rand_method(RAND_METHOD *meth); | 75 | void RAND_set_rand_method(RAND_METHOD *meth); |
74 | RAND_METHOD *RAND_get_rand_method(void ); | 76 | RAND_METHOD *RAND_get_rand_method(void ); |
75 | RAND_METHOD *RAND_SSLeay(void); | 77 | RAND_METHOD *RAND_SSLeay(void); |
76 | void RAND_cleanup(void ); | 78 | void RAND_cleanup(void ); |
77 | void RAND_bytes(unsigned char *buf,int num); | 79 | int RAND_bytes(unsigned char *buf,int num); |
80 | int RAND_pseudo_bytes(unsigned char *buf,int num); | ||
78 | void RAND_seed(const void *buf,int num); | 81 | void RAND_seed(const void *buf,int num); |
82 | void RAND_add(const void *buf,int num,double entropy); | ||
79 | int RAND_load_file(const char *file,long max_bytes); | 83 | int RAND_load_file(const char *file,long max_bytes); |
80 | int RAND_write_file(const char *file); | 84 | int RAND_write_file(const char *file); |
81 | char *RAND_file_name(char *file,int num); | 85 | const char *RAND_file_name(char *file,int num); |
86 | int RAND_status(void); | ||
87 | int RAND_egd(const char *path); | ||
82 | #ifdef WINDOWS | 88 | #ifdef WINDOWS |
83 | void RAND_screen(void); | 89 | void RAND_screen(void); |
84 | #endif | 90 | #endif |
91 | void 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 | |||