From: elijah Date: Tue, 30 Jul 2013 01:33:14 +0000 (-0700) Subject: better seed for secret generation X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=0f92af724ebab6416fc641b57f0a6d43614c25da;p=leap%2Fleap_cli.git better seed for secret generation --- 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