Project

General

Profile

Bug #7811 ยป 247.patch

zzak (zzak _), 02/09/2013 12:12 PM

View differences:

lib/securerandom.rb
if @pid != pid
now = Time.now
ary = [now.to_i, now.nsec, @pid, pid]
OpenSSL::Random.seed(ary.to_s)
OpenSSL::Random.seed(ary.join("").to_s)
@pid = pid
end
return OpenSSL::Random.random_bytes(n)
    (1-1/1)