summaryrefslogtreecommitdiff
path: root/src/common/crypto.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-11-12 04:12:35 +0000
committerNick Mathewson <nickm@torproject.org>2003-11-12 04:12:35 +0000
commit785f5cdac81c9565c0c584c05da8b69f0e992f44 (patch)
treeb5eb82e10f11a5a9825ee39279e8f76007c9cd56 /src/common/crypto.h
parent99a6d48f62c0a0a6367b196634b8dfba6526cccf (diff)
downloadtor-785f5cdac81c9565c0c584c05da8b69f0e992f44.tar.gz
tor-785f5cdac81c9565c0c584c05da8b69f0e992f44.zip
Make crypto_pseudo_rand* never fail.
svn:r797
Diffstat (limited to 'src/common/crypto.h')
-rw-r--r--src/common/crypto.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 31e995d3bd..ab5422d8cd 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -100,9 +100,8 @@ int crypto_SHA_digest(unsigned char *m, int len, unsigned char *digest);
/* random numbers */
int crypto_seed_rng();
int crypto_rand(unsigned int n, unsigned char *to);
-int crypto_pseudo_rand(unsigned int n, unsigned char *to);
-
-#define CRYPTO_PSEUDO_RAND_INT(v) crypto_pseudo_rand(sizeof(v),(char*)&(v))
+void crypto_pseudo_rand(unsigned int n, unsigned char *to);
+int crypto_pseudo_rand_int(int max);
/* errors */
char *crypto_perror();