diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2000-04-13 06:33:22 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2000-04-13 06:33:22 +0000 |
commit | f579bf8ec7713035a231884db9958cdc4ff5d7cf (patch) | |
tree | 85b9c007d5ac1d91a3895eef3fd18d6114b62cc4 /crypto/openssl/crypto/rand/rand_lib.c | |
parent | 97b2ed56f81c44973772e4cf3869f4f70e2b5d78 (diff) | |
download | src-f579bf8ec7713035a231884db9958cdc4ff5d7cf.tar.gz src-f579bf8ec7713035a231884db9958cdc4ff5d7cf.zip |
Initial import of OpenSSL 0.9.5a
Notes
Notes:
svn path=/vendor-crypto/openssl/dist/; revision=59191
Diffstat (limited to 'crypto/openssl/crypto/rand/rand_lib.c')
-rw-r--r-- | crypto/openssl/crypto/rand/rand_lib.c | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/crypto/openssl/crypto/rand/rand_lib.c b/crypto/openssl/crypto/rand/rand_lib.c index 34c6d5b9681d..7da74aab0ef3 100644 --- a/crypto/openssl/crypto/rand/rand_lib.c +++ b/crypto/openssl/crypto/rand/rand_lib.c @@ -57,7 +57,6 @@ */ #include <stdio.h> -#include <sys/types.h> #include <time.h> #include <openssl/rand.h> @@ -90,9 +89,29 @@ void RAND_seed(const void *buf, int num) rand_meth->seed(buf,num); } -void RAND_bytes(unsigned char *buf, int num) +void RAND_add(const void *buf, int num, double entropy) { if (rand_meth != NULL) - rand_meth->bytes(buf,num); + rand_meth->add(buf,num,entropy); } +int RAND_bytes(unsigned char *buf, int num) + { + if (rand_meth != NULL) + return rand_meth->bytes(buf,num); + return(-1); + } + +int RAND_pseudo_bytes(unsigned char *buf, int num) + { + if (rand_meth != NULL) + return rand_meth->pseudorand(buf,num); + return(-1); + } + +int RAND_status(void) + { + if (rand_meth != NULL) + return rand_meth->status(); + return 0; + } |