[or-cvs] Choose correct abstraction for topic_foo. Abstract random-...

Nick Mathewson nickm at seul.org
Thu Apr 17 17:10:43 UTC 2003


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv25669/src/common

Modified Files:
	crypto.h 
Log Message:
Choose correct abstraction for topic_foo.  Abstract random-integer code

Index: crypto.h
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- crypto.h	19 Mar 2003 20:41:15 -0000	1.6
+++ crypto.h	17 Apr 2003 17:10:40 -0000	1.7
@@ -85,6 +85,8 @@
 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))
+
 /* errors */
 char *crypto_perror();
 #endif



More information about the tor-commits mailing list