Don't cheat: when only getting several bytes from each source, n is incremented
[openssl.git] / crypto / rand / rand.h
index e5d6696cb40c56403d848f919b5aafd60ff659ff..eb9c8c034de906b3a960b2aa2885e8e517b9cec8 100644 (file)
@@ -70,9 +70,16 @@ typedef struct rand_meth_st
        void (*cleanup)(void);
        void (*add)(const void *buf, int num, double entropy);
        int (*pseudorand)(unsigned char *buf, int num);
+       int (*status)(void);
        } RAND_METHOD;
 
-void RAND_set_rand_method(RAND_METHOD *meth);
+#ifdef BN_DEBUG
+extern int rand_predictable;
+#endif
+
+struct engine_st;
+
+int RAND_set_rand_method(struct engine_st *meth);
 RAND_METHOD *RAND_get_rand_method(void );
 RAND_METHOD *RAND_SSLeay(void);
 void RAND_cleanup(void );
@@ -83,10 +90,30 @@ void RAND_add(const void *buf,int num,double entropy);
 int  RAND_load_file(const char *file,long max_bytes);
 int  RAND_write_file(const char *file);
 const char *RAND_file_name(char *file,int num);
-#ifdef WINDOWS
+int RAND_status(void);
+int RAND_egd(const char *path);
+int RAND_egd_bytes(const char *path,int bytes);
+void ERR_load_RAND_strings(void);
+int RAND_poll(void);
+
+#ifdef  __cplusplus
+}
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+#include <windows.h>
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
 void RAND_screen(void);
+int RAND_event(UINT, WPARAM, LPARAM);
+
+#ifdef  __cplusplus
+}
+#endif
 #endif
-void   ERR_load_RAND_strings(void);
 
 /* BEGIN ERROR CODES */
 /* The following lines are auto generated by the script mkerr.pl. Any changes
@@ -101,8 +128,5 @@ void        ERR_load_RAND_strings(void);
 /* Reason codes. */
 #define RAND_R_PRNG_NOT_SEEDED                          100
 
-#ifdef  __cplusplus
-}
-#endif
 #endif