diff options
author | elijah <elijah@riseup.net> | 2013-07-29 18:33:14 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-07-29 18:33:14 -0700 |
commit | 0f92af724ebab6416fc641b57f0a6d43614c25da (patch) | |
tree | 6322900369ba10e7c7223d7c85d1fa01e81fc4b2 /lib | |
parent | 578541a02b85d622f06637b29e2a6f8e32515994 (diff) | |
download | leap_cli-0f92af724ebab6416fc641b57f0a6d43614c25da.tar.gz leap_cli-0f92af724ebab6416fc641b57f0a6d43614c25da.tar.bz2 |
better seed for secret generation
Diffstat (limited to 'lib')
-rw-r--r-- | lib/leap_cli/util/secret.rb | 3 |
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 |