diff options
| author | markus <> | 2002-09-05 12:51:50 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-05 12:51:50 +0000 |
| commit | 15b5d84f9da2ce4bfae8580e56e34a859f74ad71 (patch) | |
| tree | bf939e82d7fd73cc8a01cf6959002209972091bc /src/lib/libcrypto/rand/rand.h | |
| parent | 027351f729b9e837200dae6e1520cda6577ab930 (diff) | |
| download | openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.gz openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.tar.bz2 openbsd-15b5d84f9da2ce4bfae8580e56e34a859f74ad71.zip | |
import openssl-0.9.7-beta1
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/rand/rand.h | 72 |
1 files changed, 53 insertions, 19 deletions
diff --git a/src/lib/libcrypto/rand/rand.h b/src/lib/libcrypto/rand/rand.h index 477d7a150a..e17aa7a9f7 100644 --- a/src/lib/libcrypto/rand/rand.h +++ b/src/lib/libcrypto/rand/rand.h | |||
| @@ -59,34 +59,68 @@ | |||
| 59 | #ifndef HEADER_RAND_H | 59 | #ifndef HEADER_RAND_H |
| 60 | #define HEADER_RAND_H | 60 | #define HEADER_RAND_H |
| 61 | 61 | ||
| 62 | #include <stdlib.h> | ||
| 63 | #include <openssl/ossl_typ.h> | ||
| 64 | |||
| 62 | #ifdef __cplusplus | 65 | #ifdef __cplusplus |
| 63 | extern "C" { | 66 | extern "C" { |
| 64 | #endif | 67 | #endif |
| 65 | 68 | ||
| 66 | #ifndef NOPROTO | 69 | typedef struct rand_meth_st |
| 70 | { | ||
| 71 | void (*seed)(const void *buf, int num); | ||
| 72 | int (*bytes)(unsigned char *buf, int num); | ||
| 73 | void (*cleanup)(void); | ||
| 74 | void (*add)(const void *buf, int num, double entropy); | ||
| 75 | int (*pseudorand)(unsigned char *buf, int num); | ||
| 76 | int (*status)(void); | ||
| 77 | } RAND_METHOD; | ||
| 78 | |||
| 79 | #ifdef BN_DEBUG | ||
| 80 | extern int rand_predictable; | ||
| 81 | #endif | ||
| 82 | |||
| 83 | int RAND_set_rand_method(const RAND_METHOD *meth); | ||
| 84 | const RAND_METHOD *RAND_get_rand_method(void); | ||
| 85 | int RAND_set_rand_engine(ENGINE *engine); | ||
| 86 | RAND_METHOD *RAND_SSLeay(void); | ||
| 67 | void RAND_cleanup(void ); | 87 | void RAND_cleanup(void ); |
| 68 | void RAND_bytes( unsigned char *buf,int num); | 88 | int RAND_bytes(unsigned char *buf,int num); |
| 69 | void RAND_seed( unsigned char *buf,int num); | 89 | int RAND_pseudo_bytes(unsigned char *buf,int num); |
| 70 | int RAND_load_file(char *file,long max_bytes); | 90 | void RAND_seed(const void *buf,int num); |
| 71 | int RAND_write_file(char *file); | 91 | void RAND_add(const void *buf,int num,double entropy); |
| 72 | char *RAND_file_name(char *file,int num); | 92 | int RAND_load_file(const char *file,long max_bytes); |
| 73 | #ifdef WINDOWS | 93 | int RAND_write_file(const char *file); |
| 94 | const char *RAND_file_name(char *file,size_t num); | ||
| 95 | int RAND_status(void); | ||
| 96 | int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes); | ||
| 97 | int RAND_egd(const char *path); | ||
| 98 | int RAND_egd_bytes(const char *path,int bytes); | ||
| 99 | int RAND_poll(void); | ||
| 100 | |||
| 101 | #if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_WIN32) | ||
| 102 | |||
| 74 | void RAND_screen(void); | 103 | void RAND_screen(void); |
| 104 | int RAND_event(UINT, WPARAM, LPARAM); | ||
| 105 | |||
| 75 | #endif | 106 | #endif |
| 76 | #else | 107 | |
| 77 | void RAND_cleanup(); | 108 | /* BEGIN ERROR CODES */ |
| 78 | void RAND_bytes(); | 109 | /* The following lines are auto generated by the script mkerr.pl. Any changes |
| 79 | void RAND_seed(); | 110 | * made after this point may be overwritten when the script is next run. |
| 80 | int RAND_load_file(); | 111 | */ |
| 81 | int RAND_write_file(); | 112 | void ERR_load_RAND_strings(void); |
| 82 | char *RAND_file_name(); | 113 | |
| 83 | #ifdef WINDOWS | 114 | /* Error codes for the RAND functions. */ |
| 84 | void RAND_screen(); | 115 | |
| 85 | #endif | 116 | /* Function codes. */ |
| 86 | #endif | 117 | #define RAND_F_RAND_GET_RAND_METHOD 101 |
| 118 | #define RAND_F_SSLEAY_RAND_BYTES 100 | ||
| 119 | |||
| 120 | /* Reason codes. */ | ||
| 121 | #define RAND_R_PRNG_NOT_SEEDED 100 | ||
| 87 | 122 | ||
| 88 | #ifdef __cplusplus | 123 | #ifdef __cplusplus |
| 89 | } | 124 | } |
| 90 | #endif | 125 | #endif |
| 91 | |||
| 92 | #endif | 126 | #endif |
