From 0f92af724ebab6416fc641b57f0a6d43614c25da Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 29 Jul 2013 18:33:14 -0700 Subject: better seed for secret generation --- lib/leap_cli/util/secret.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3