struct engine_st;
int RAND_set_rand_method(struct engine_st *meth);
-RAND_METHOD *RAND_get_rand_method(void );
+const RAND_METHOD *RAND_get_rand_method(void );
RAND_METHOD *RAND_SSLeay(void);
void RAND_cleanup(void );
int RAND_bytes(unsigned char *buf,int num);
}
#endif
-RAND_METHOD *RAND_get_rand_method(void)
+const RAND_METHOD *RAND_get_rand_method(void)
{
if (rand_engine == NULL
&& (rand_engine = ENGINE_get_default_RAND()) == NULL)
void RAND_cleanup(void)
{
- RAND_METHOD *meth = RAND_get_rand_method();
+ const RAND_METHOD *meth = RAND_get_rand_method();
if (meth && meth->cleanup)
meth->cleanup();
}
void RAND_seed(const void *buf, int num)
{
- RAND_METHOD *meth = RAND_get_rand_method();
+ const RAND_METHOD *meth = RAND_get_rand_method();
if (meth && meth->seed)
meth->seed(buf,num);
}
void RAND_add(const void *buf, int num, double entropy)
{
- RAND_METHOD *meth = RAND_get_rand_method();
+ const RAND_METHOD *meth = RAND_get_rand_method();
if (meth && meth->add)
meth->add(buf,num,entropy);
}
int RAND_bytes(unsigned char *buf, int num)
{
- RAND_METHOD *meth = RAND_get_rand_method();
+ const RAND_METHOD *meth = RAND_get_rand_method();
if (meth && meth->bytes)
return meth->bytes(buf,num);
return(-1);
int RAND_pseudo_bytes(unsigned char *buf, int num)
{
- RAND_METHOD *meth = RAND_get_rand_method();
+ const RAND_METHOD *meth = RAND_get_rand_method();
if (meth && meth->pseudorand)
return meth->pseudorand(buf,num);
return(-1);
int RAND_status(void)
{
- RAND_METHOD *meth = RAND_get_rand_method();
+ const RAND_METHOD *meth = RAND_get_rand_method();
if (meth && meth->status)
return meth->status();
return 0;