]> gitweb.fluxo.info Git - leap/leap_cli.git/commitdiff
better seed for secret generation
authorelijah <elijah@riseup.net>
Tue, 30 Jul 2013 01:33:14 +0000 (18:33 -0700)
committerelijah <elijah@riseup.net>
Tue, 30 Jul 2013 01:33:14 +0000 (18:33 -0700)
lib/leap_cli/util/secret.rb

index 47a050efd9b3a14a2793fd12aef69a16d4f11ff0..32c61d35807b59e843e42e2ecc561c388f8dff24 100644 (file)
@@ -44,7 +44,8 @@ module LeapCli; module Util
       pid = $$
       if @pid != pid
         now = Time.now
-        OpenSSL::Random.seed( [now.to_i, @pid, pid].join )
+        ary = [now.to_i, now.nsec, @pid, pid]
+        OpenSSL::Random.seed(ary.to_s)
         @pid = pid
       end
     end