X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=crypto%2Frand%2Frand.h;h=7baac68ee52af637f1ffa17b45c05ee41b6854a6;hp=99ca47d6cf9e6c1d8a9d5578d0c30e571ee344c5;hb=175b0942ec7e82f86831916d325922817872e657;hpb=eda1f21f1af8b6f77327e7b37573af9c1ba73726 diff --git a/crypto/rand/rand.h b/crypto/rand/rand.h index 99ca47d6cf..7baac68ee5 100644 --- a/crypto/rand/rand.h +++ b/crypto/rand/rand.h @@ -1,5 +1,5 @@ /* crypto/rand/rand.h */ -/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) +/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * * This package is an SSL implementation written @@ -63,17 +63,36 @@ extern "C" { #endif +typedef struct rand_meth_st + { #ifndef NOPROTO + void (*seed)(const void *buf, int num); + void (*bytes)(unsigned char *buf, int num); + void (*cleanup)(void); +#else + void (*seed)(); + void (*bytes)(); + void (*cleanup)(); +#endif + } RAND_METHOD; + +#ifndef NOPROTO +void RAND_set_rand_method(RAND_METHOD *meth); +RAND_METHOD *RAND_get_rand_method(void ); +RAND_METHOD *RAND_SSLeay(void); void RAND_cleanup(void ); -void RAND_bytes( unsigned char *buf,int num); -void RAND_seed( unsigned char *buf,int num); -int RAND_load_file(char *file,long max_bytes); -int RAND_write_file(char *file); +void RAND_bytes(unsigned char *buf,int num); +void RAND_seed(const void *buf,int num); +int RAND_load_file(const char *file,long max_bytes); +int RAND_write_file(const char *file); char *RAND_file_name(char *file,int num); #ifdef WINDOWS void RAND_screen(void); #endif #else +void RAND_set_rand_method(); +RAND_METHOD *RAND_get_rand_method(); +RAND_METHOD *RAND_SSLeay(); void RAND_cleanup(); void RAND_bytes(); void RAND_seed();