apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject svn commit: r592651 - /apr/apr-util/trunk/crypto/getuuid.c
Date Wed, 07 Nov 2007 08:20:28 GMT
Author: rse
Date: Wed Nov  7 00:20:28 2007
New Revision: 592651

URL: http://svn.apache.org/viewvc?rev=592651&view=rev
Log:
Use plain "apr_time_now" for seeding the PRNG instead of using
the internal "get_system_time" wrapper, because "get_system_time"
unnecessarily destroys entropy and performs unnecessary additional
calculation (because of resolution adjustments which are UUID-related
and hence are of no interest for PRNG seeding at all).

Modified:
    apr/apr-util/trunk/crypto/getuuid.c

Modified: apr/apr-util/trunk/crypto/getuuid.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/crypto/getuuid.c?rev=592651&r1=592650&r2=592651&view=diff
==============================================================================
--- apr/apr-util/trunk/crypto/getuuid.c (original)
+++ apr/apr-util/trunk/crypto/getuuid.c Wed Nov  7 00:20:28 2007
@@ -131,7 +131,7 @@
 
     /* crap. this isn't crypto quality, but it will be Good Enough */
 
-    get_system_time(&time_now);
+    time_now = apr_time_now();
     srand((unsigned int)(((time_now >> 32) ^ time_now) & 0xffffffff));
 
     return rand() & 0x0FFFF;



Mime
View raw message