aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-07-29 18:33:14 -0700
committerelijah <elijah@riseup.net>2013-07-29 18:33:14 -0700
commit0f92af724ebab6416fc641b57f0a6d43614c25da (patch)
tree6322900369ba10e7c7223d7c85d1fa01e81fc4b2
parent578541a02b85d622f06637b29e2a6f8e32515994 (diff)
downloadleap_cli-0f92af724ebab6416fc641b57f0a6d43614c25da.tar.gz
leap_cli-0f92af724ebab6416fc641b57f0a6d43614c25da.tar.bz2
better seed for secret generation
-rw-r--r--lib/leap_cli/util/secret.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/leap_cli/util/secret.rb b/lib/leap_cli/util/secret.rb
index 47a050e..32c61d3 100644
--- a/lib/leap_cli/util/secret.rb
+++ b/lib/leap_cli/util/secret.rb
@@ -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