OSSP CVS Repository

ossp - Difference in ossp-pkg/uuid/uuid_prng.c versions 1.7 and 1.8
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/uuid/uuid_prng.c 1.7 -> 1.8

--- uuid_prng.c  2005/08/30 18:41:56     1.7
+++ uuid_prng.c  2005/08/30 19:25:04     1.8
@@ -130,9 +130,9 @@
     /* approach 2: try to gather data via weaker libc PRNG API. */
     while (n > 0) {
         /* gather new entropy */
-        (void)gettimeofday(&(entropy.tv), NULL);
-        entropy.cnt = prng->cnt++;
-        entropy.rnd = rand();
+        (void)gettimeofday(&(entropy.tv), NULL);            /* source: libc time */
+        entropy.rnd = rand();                               /* source: libc PRNG */
+        entropy.cnt = prng->cnt++;                          /* source: local counter */
 
         /* pass entropy into MD5 engine */
         if (md5_update(prng->md5, (void *)&entropy, sizeof(entropy)) != MD5_RC_OK)

CVSTrac 2.0.1