From c3c4ffa9725947a1c150880502399c3309a4fb31 Mon Sep 17 00:00:00 2001 From: akr Date: Tue, 2 Apr 2013 15:09:36 +0000 Subject: * lib/securerandom.rb (SecureRandom.random_bytes): Use OpenSSL::Random.random_add instead of OpenSSL::Random.seed and specify 0.0 as the entropy. [ruby-core:47308] [Bug #6928] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/securerandom.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/securerandom.rb') diff --git a/lib/securerandom.rb b/lib/securerandom.rb index 0127838b00..227a6189c4 100644 --- a/lib/securerandom.rb +++ b/lib/securerandom.rb @@ -62,7 +62,7 @@ module SecureRandom if @pid != pid now = Time.now ary = [now.to_i, now.nsec, @pid, pid] - OpenSSL::Random.seed(ary.join("").to_s) + OpenSSL::Random.random_add(ary.join("").to_s, 0.0) @pid = pid end return OpenSSL::Random.random_bytes(n) -- cgit v1.2.3