summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/securerandom.rb11
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/securerandom.rb b/lib/securerandom.rb
index 07ae048634..c5be6ce734 100644
--- a/lib/securerandom.rb
+++ b/lib/securerandom.rb
@@ -47,17 +47,6 @@ module SecureRandom
private
def gen_random_openssl(n)
- @pid = 0 unless defined?(@pid)
- pid = $$
- unless @pid == pid
- now = Process.clock_gettime(Process::CLOCK_REALTIME, :nanosecond)
- OpenSSL::Random.random_add([now, @pid, pid].join(""), 0.0)
- seed = Random.urandom(16)
- if (seed)
- OpenSSL::Random.random_add(seed, 16)
- end
- @pid = pid
- end
return OpenSSL::Random.random_bytes(n)
end